|
|
d80d1f |
From afb42b86ad8bd72930859968c92c084134e6d114 Mon Sep 17 00:00:00 2001
|
|
|
d80d1f |
From: Cole Robinson <crobinso@redhat.com>
|
|
|
d80d1f |
Date: Sat, 20 Aug 2022 09:54:01 -0400
|
|
|
d80d1f |
Subject: [PATCH] virtinstall: fix regression with --boot and no install method
|
|
|
d80d1f |
|
|
|
d80d1f |
Anything passed to --boot should imply --install no_install=yes
|
|
|
d80d1f |
in the absence of other --install options. This is historically
|
|
|
d80d1f |
what we've done but we regressed in 4.1.0
|
|
|
d80d1f |
|
|
|
d80d1f |
Resolves: https://github.com/virt-manager/virt-manager/issues/426
|
|
|
d80d1f |
|
|
|
d80d1f |
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
d80d1f |
|
|
|
d80d1f |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2144885
|
|
|
d80d1f |
|
|
|
d80d1f |
(cherry picked from commit e94786c066696781a821f5a4bcef3c377e4bc5e5)
|
|
|
d80d1f |
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
d80d1f |
---
|
|
|
d80d1f |
tests/test_cli.py | 1 +
|
|
|
d80d1f |
virtinst/virtinstall.py | 3 ++-
|
|
|
d80d1f |
2 files changed, 3 insertions(+), 1 deletion(-)
|
|
|
d80d1f |
|
|
|
d80d1f |
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
|
|
d80d1f |
index 774db098f..ca8d2340a 100644
|
|
|
d80d1f |
--- a/tests/test_cli.py
|
|
|
d80d1f |
+++ b/tests/test_cli.py
|
|
|
d80d1f |
@@ -966,6 +966,7 @@ c.add_valid("--os-variant generic --pxe --ram 16", grep="Requested memory 16 MiB
|
|
|
d80d1f |
c.add_valid("--os-variant winxp --ram 32 --cdrom %(EXISTIMG1)s", grep="32 MiB is less than the recommended 64 MiB") # Windows. Catch memory warning
|
|
|
d80d1f |
c.add_valid("--osinfo generic --pxe --autostart") # --autostart flag
|
|
|
d80d1f |
c.add_valid("--cdrom %(EXISTIMG2)s --os-variant win2k3 --print-step 2") # HVM windows install, print 3rd stage XML
|
|
|
d80d1f |
+c.add_valid("--memory 512 --osinfo generic --boot cdrom") # --boot XXX should imply --install no_install
|
|
|
d80d1f |
c.add_compare("--location location=%(TREEDIR)s --initrd-inject virt-install --extra-args ks=file:/virt-install", "initrd-inject") # initrd-inject
|
|
|
d80d1f |
c.add_compare("--cdrom http://example.com/path/to/some.iso --os-variant detect=yes,require=no", "cdrom-url")
|
|
|
d80d1f |
c.add_compare("--pxe --print-step all --os-variant none", "simple-pxe") # Diskless PXE install
|
|
|
d80d1f |
diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py
|
|
|
d80d1f |
index 6d7f56b8d..20b901813 100644
|
|
|
d80d1f |
--- a/virtinst/virtinstall.py
|
|
|
d80d1f |
+++ b/virtinst/virtinstall.py
|
|
|
d80d1f |
@@ -431,7 +431,7 @@ def build_installer(options, guest, installdata):
|
|
|
d80d1f |
pass
|
|
|
d80d1f |
elif (options.import_install or
|
|
|
d80d1f |
options.xmlonly or
|
|
|
d80d1f |
- options.boot or
|
|
|
d80d1f |
+ options.boot_was_set or
|
|
|
d80d1f |
options.cloud_init or
|
|
|
d80d1f |
options.unattended):
|
|
|
d80d1f |
no_install = True
|
|
|
d80d1f |
@@ -641,6 +641,7 @@ def _build_options_guest(conn, options):
|
|
|
d80d1f |
def build_guest_instance(conn, options):
|
|
|
d80d1f |
installdata = cli.parse_install(options.install)
|
|
|
d80d1f |
osdata = cli.parse_os_variant(options.os_variant or installdata.os)
|
|
|
d80d1f |
+ options.boot_was_set = bool(options.boot)
|
|
|
d80d1f |
|
|
|
d80d1f |
if options.reinstall:
|
|
|
d80d1f |
dummy1, guest, dummy2 = cli.get_domain_and_guest(conn, options.reinstall)
|
|
|
d80d1f |
--
|
|
|
d80d1f |
2.38.1
|
|
|
d80d1f |
|