[virt-tools-list] [virt-manager PATCH 4/8] domcapabilities: fix CPUModel usable attribute
Pavel Hrdina
phrdina at redhat.com
Fri Mar 15 16:41:38 UTC 2019
It is not True/False attribute, it can contain 'unknown' value as well
which means libvirt cannot figure out whether the CPU model is usable
with that specific QEMU binary.
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
virtinst/domain/cpu.py | 2 +-
virtinst/domcapabilities.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index 3548acd7..8cf85a43 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -239,7 +239,7 @@ class DomainCpu(XMLBuilder):
return
cpu_model = domcaps_mode.get_model(self.model)
- if cpu_model and cpu_model.usable:
+ if cpu_model and cpu_model.usable != "no":
return
logging.debug("Host capabilities CPU '%s' is not supported "
diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py
index 4d505225..bab6d694 100644
--- a/virtinst/domcapabilities.py
+++ b/virtinst/domcapabilities.py
@@ -94,7 +94,7 @@ class _Features(_CapsBlock):
class _CPUModel(XMLBuilder):
XML_NAME = "model"
model = XMLProperty(".")
- usable = XMLProperty("./@usable", is_yesno=True)
+ usable = XMLProperty("./@usable")
fallback = XMLProperty("./@fallback")
--
2.20.1
More information about the virt-tools-list
mailing list