[virt-tools-list] [virt-manager PATCH v2 25/25] virt-install: Deal with "--cdrom" unattended installation

Fabiano Fidêncio fidencio at redhat.com
Tue Feb 26 09:43:56 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 a904db2e..22805d4c 100755
--- a/virt-install
+++ b/virt-install
@@ -451,6 +451,9 @@ def build_installer(options, guest):
     has_installer = True
 
     if options.unattended:
+        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