[virt-manager] [PATCH] domain: cpu: Clear 'migratable' when changing to custom cpu
Lin Ma
lma at suse.com
Wed Jul 20 06:53:32 UTC 2022
Otherwise going host-passthrough -> custom can cause libvirt validation
error due to libvirt fills the default value(migratable='on') for the
host-passthrough in domain XML.
Signed-off-by: Lin Ma <lma at suse.com>
---
virtinst/domain/cpu.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py
index e40c5307..5de42b4e 100644
--- a/virtinst/domain/cpu.py
+++ b/virtinst/domain/cpu.py
@@ -358,6 +358,7 @@ class DomainCpu(XMLBuilder):
def set_model(self, guest, val):
log.debug("setting cpu model %s", val)
+ self.migratable = None
if val:
self.mode = "custom"
if not self.match:
--
2.26.2
More information about the virt-tools-list
mailing list