2018-03-13 16:09:20 +01:00
|
|
|
References: bsc#1067018 - L3: KVM Guest creation failed - Property .cmt not found
|
|
|
|
|
|
|
|
Some hardware has the .cmt cpu feature but qemu doesn't support it. libvirt
|
|
|
|
includes it in the cpu capabilities read in by virt-manager. Using 'host-model'
|
|
|
|
was known to have issues in the past and so a copy method was set up to
|
|
|
|
manually copy cpu features one at a time (including the unsupported cmt flag).
|
|
|
|
This patch simply avoids the special copy feature when "Copy host CPU definition"
|
|
|
|
is set in the Preferences -> New VM -> CPU Default pop-up menu and falls
|
|
|
|
back to using 'host-model'.
|
|
|
|
|
|
|
|
It should be noted that selecting "Customize configuration before install"
|
|
|
|
and "CPUs" -> "Copy host CPU definition" also inserts 'host-model' so
|
|
|
|
this change mirrors what is already done there.
|
|
|
|
|
2020-09-16 19:23:41 +02:00
|
|
|
Index: virt-manager-3.0.0/virtinst/domain/cpu.py
|
2018-03-13 16:09:20 +01:00
|
|
|
===================================================================
|
2020-09-16 19:23:41 +02:00
|
|
|
--- virt-manager-3.0.0.orig/virtinst/domain/cpu.py
|
|
|
|
+++ virt-manager-3.0.0/virtinst/domain/cpu.py
|
|
|
|
@@ -122,12 +122,16 @@ class DomainCpu(XMLBuilder):
|
2018-10-30 23:00:52 +01:00
|
|
|
val = self.SPECIAL_MODE_HOST_MODEL
|
|
|
|
|
2018-03-13 16:09:20 +01:00
|
|
|
if (val == self.SPECIAL_MODE_HOST_MODEL or
|
|
|
|
- val == self.SPECIAL_MODE_HOST_PASSTHROUGH):
|
|
|
|
+ val == self.SPECIAL_MODE_HOST_PASSTHROUGH or
|
|
|
|
+ val == self.SPECIAL_MODE_HOST_COPY):
|
|
|
|
self.model = None
|
|
|
|
self.vendor = None
|
|
|
|
self.model_fallback = None
|
|
|
|
for f in self.features:
|
2018-10-30 23:00:52 +01:00
|
|
|
self.remove_child(f)
|
2018-03-13 16:09:20 +01:00
|
|
|
+ if val == self.SPECIAL_MODE_HOST_COPY:
|
|
|
|
+ val = self.SPECIAL_MODE_HOST_MODEL
|
|
|
|
+ self.match = "exact"
|
|
|
|
self.mode = val
|
|
|
|
elif val == self.SPECIAL_MODE_HOST_COPY:
|
2018-10-30 23:00:52 +01:00
|
|
|
self.copy_host_cpu(guest)
|