[PATCH 3/7] virt-install: utilize the LXC installer

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

 



This hooks the newly added LXCInstaller class to the virt-install tool.
It is used when a container is being installed and installtion tree
location is set.
---
 virt-install         | 9 ++++++---
 virtinst/__init__.py | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/virt-install b/virt-install
index 8b84eff60..c5d2b15f5 100755
--- a/virt-install
+++ b/virt-install
@@ -460,7 +460,7 @@ def check_option_collisions(options, guest):
              {"methods": install_methods})
 
     if (guest.os.is_container() and
-        install_specified(options.location, options.cdrom,
+        install_specified(None, options.cdrom,
                           options.pxe, options.import_install)):
         fail(_("Install methods (%s) cannot be specified for "
                "container guests") % install_methods)
@@ -556,10 +556,13 @@ def build_installer(options, conn, virt_type):
     # Build the Installer instance
     if options.pxe:
         instclass = virtinst.PXEInstaller
+    elif virt_type == "exe":
+        if options.location:
+            instclass = virtinst.LXCInstaller
+        else:
+            instclass = virtinst.ContainerInstaller
     elif options.cdrom or options.location or options.livecd:
         instclass = virtinst.DistroInstaller
-    elif virt_type == "exe":
-        instclass = virtinst.ContainerInstaller
     elif options.import_install or options.boot:
         if options.import_install and options.nodisks:
             fail(_("A disk device must be specified with --import."))
diff --git a/virtinst/__init__.py b/virtinst/__init__.py
index eb3ec9b37..62207bae1 100644
--- a/virtinst/__init__.py
+++ b/virtinst/__init__.py
@@ -88,6 +88,7 @@ from virtinst.installer import (ContainerInstaller, ImportInstaller,
                                 PXEInstaller, Installer)
 
 from virtinst.distroinstaller import DistroInstaller
+from virtinst.lxcinstaller import LXCInstaller
 
 from virtinst.guest import Guest
 from virtinst.cloner import Cloner
-- 
2.14.3

_______________________________________________
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