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 <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-02-20 11:04:37 -05:00
parent 6ddcb23d9a
commit e3ecae0d2a

View File

@ -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