[virt-tools-list] [PATCH v4 4/5] Tune default device list for Virtuozzo containers
Mikhail Feoktistov
mfeoktistov at virtuozzo.com
Mon Mar 13 12:01:53 UTC 2017
Virtuozzo supports virtio NIC.
Also add default VNC graphics.
Privnet feature and emulator device have no sense for vz containers.
---
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 7645cf9..00161a0 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 74d3397..1186ea9 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -635,7 +635,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
@@ -764,7 +764,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
@@ -828,7 +828,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