summaryrefslogtreecommitdiff
path: root/virtinst
diff options
context:
space:
mode:
authorLin Ma <lma@suse.com>2022-07-20 14:53:32 +0800
committerCole Robinson <crobinso@redhat.com>2022-08-01 10:11:43 -0400
commitb8a77805b0606191c368f8aaf8254f2569b7278a (patch)
treeb9430edb9a51c7e77e135a3af60840ec75c6794e /virtinst
parentcf2c28ada1272ca4243e4d5be3f7311be0c18ae0 (diff)
downloadvirt-manager-b8a77805b0606191c368f8aaf8254f2569b7278a.tar.gz
domain: cpu: Clear 'migratable' when changing to custom cpu
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@suse.com>
Diffstat (limited to 'virtinst')
-rw-r--r--virtinst/domain/cpu.py1
1 files changed, 1 insertions, 0 deletions
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: