cpu: clear config first if user requests host-model-only
Clears the existing CPU config if user picks 'Application Default' in the virt-manager UI, since otherwise we might leave a stale vendor or flags defined.
This commit is contained in:
parent
0910c8dcfc
commit
a3508f2269
|
@ -87,6 +87,7 @@ class CPU(XMLBuilder):
|
||||||
self.clear()
|
self.clear()
|
||||||
elif val == self.SPECIAL_MODE_HOST_MODEL_ONLY:
|
elif val == self.SPECIAL_MODE_HOST_MODEL_ONLY:
|
||||||
if self.conn.caps.host.cpu.model:
|
if self.conn.caps.host.cpu.model:
|
||||||
|
self.clear()
|
||||||
self.model = self.conn.caps.host.cpu.model
|
self.model = self.conn.caps.host.cpu.model
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("programming error: unknown "
|
raise RuntimeError("programming error: unknown "
|
||||||
|
|
Loading…
Reference in New Issue