[virt-manager PATCH] virt-install: enable container to use "--boot init=INITPATH"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>

If we use "--boot init=INITPATH" style to set
container's init, virt-install will complain:

"ERROR    Install methods (--location URL,
--cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)
cannot be specified for container guests"

This patch will fix this bug.

Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx>
---
 virt-install | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virt-install b/virt-install
index ca78d1e..835d445 100755
--- a/virt-install
+++ b/virt-install
@@ -477,7 +477,8 @@ def build_installer(options, conn, virt_type):
     elif options.import_install or options.boot:
         if options.import_install and options.nodisks:
             fail(_("A disk device must be specified with --import."))
-        options.import_install = True
+        if options.boot and not options.boot.startswith("init="):
+            options.import_install = True
         instclass = virtinst.ImportInstaller
     elif virt_type == "exe":
         instclass = virtinst.ContainerInstaller
-- 
1.8.2.1

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux