[virt-tools-list] [virt-manager PATCH v3 9/9] virt-install: Deal with "--cdrom" unattended installations

Fabiano Fidêncio fidencio at redhat.com
Thu Mar 7 12:52:58 UTC 2019


When dealing with unattended installation, we safely can assume that
"--cdrom" can be treated as "--location". The reason for that is that
we'll need to, under the hooks, extract its kernel/initrd and perform an
initrd injection.

This commit makes "--unattended" work properly when combined with
"--cdrom".

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 virt-install | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/virt-install b/virt-install
index 27b52c6b..d7af107b 100755
--- a/virt-install
+++ b/virt-install
@@ -449,6 +449,9 @@ def build_installer(options, guest):
     if options.unattended:
         if options.os_variant.is_none or options.os_variant.is_auto:
             fail(_("--unattended requires an explicit --os-variant"))
+        if options.cdrom:
+            options.location = options.cdrom
+            options.cdrom = None
         options.os_variant.install = "location"
 
     if options.os_variant.install == "location":
-- 
2.20.1




More information about the virt-tools-list mailing list