[virt-tools-list] [PATCH v3 4/6] Tune default device list for Virtuozzo containers

Mikhail Feoktistov mfeoktistov at virtuozzo.com
Tue Feb 21 14:27:58 UTC 2017


---
 virtManager/addhardware.py | 2 +-
 virtinst/guest.py          | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index e63ad3d..3ceb27c 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -551,7 +551,7 @@ class vmmAddHardware(vmmGObjectUI):
         model.append([None, _("Hypervisor default")])
         if vm.is_hvm():
             mod_list = []
-            if vm.get_hv_type() in ["kvm", "qemu", "test"]:
+            if vm.get_hv_type() in ["kvm", "qemu", "vz", "test"]:
                 mod_list.append("virtio")
             mod_list.append("rtl8139")
             mod_list.append("e1000")
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 5b8bc7b..ae23847 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -622,7 +622,7 @@ class Guest(XMLBuilder):
             return
         if self.get_devices("graphics"):
             return
-        if self.os.is_container():
+        if self.os.is_container() and not self.conn.is_vz():
             return
         if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64"]:
             return
@@ -751,7 +751,7 @@ class Guest(XMLBuilder):
             hyperv.present = True
 
     def _set_emulator_defaults(self):
-        if self.os.is_xenpv():
+        if self.os.is_xenpv() or self.type == "vz":
             self.emulator = None
             return
 
@@ -815,7 +815,7 @@ class Guest(XMLBuilder):
             self.features.acpi = None
             self.features.apic = None
             self.features.pae = None
-            if self._is_full_os_container():
+            if self._is_full_os_container() and self.type != "vz":
                 self.features.privnet = True
             return
 
-- 
2.9.3




More information about the virt-tools-list mailing list