From e3ecae0d2afb42e22a790903c6cb15ecbc45c506 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 20 Feb 2022 11:04:37 -0500 Subject: [PATCH] domain: cpu: Clear 'migratable' and 'check' when changing mode Otherwise going host-passthrough -> host-model -> host-passthrough can cause libvirt validation errors or leave unintended bits in the XML Signed-off-by: Cole Robinson --- virtinst/domain/cpu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py index d74c3ffc..e40c5307 100644 --- a/virtinst/domain/cpu.py +++ b/virtinst/domain/cpu.py @@ -286,6 +286,8 @@ class DomainCpu(XMLBuilder): self.model = None self.vendor = None self.model_fallback = None + self.migratable = None + self.check = None for f in self.features: self.remove_child(f) self.mode = val