From a3508f2269a749288a47cec18d1ae838e814272f Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 5 Mar 2017 14:03:48 -0500 Subject: [PATCH] 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. --- virtinst/cpu.py | 1 + 1 file changed, 1 insertion(+) diff --git a/virtinst/cpu.py b/virtinst/cpu.py index 450339a9..cd9fa68e 100644 --- a/virtinst/cpu.py +++ b/virtinst/cpu.py @@ -87,6 +87,7 @@ class CPU(XMLBuilder): self.clear() elif val == self.SPECIAL_MODE_HOST_MODEL_ONLY: if self.conn.caps.host.cpu.model: + self.clear() self.model = self.conn.caps.host.cpu.model else: raise RuntimeError("programming error: unknown "