summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen ICHIKAWA <ichikawa.ken@jp.fujitsu.com>2013-03-19 13:53:46 +0900
committerCole Robinson <crobinso@redhat.com>2013-03-25 13:25:46 -0400
commit2381016b4baec53068ad2f680deb94e7f1a612fd (patch)
treeae2270073c288f4e1eb49f7dafc8b348b7722b10
parent9f4fddba0454b42df7ea0893f672084852cf2e4b (diff)
downloadvirt-manager-2381016b4baec53068ad2f680deb94e7f1a612fd.tar.gz
Allow empty cpu model
If we specify cpu model and apply once, we could not specify empty cpu model again with following error. "Error changing VM configuration: internal error Non-empty feature list specified without CPU model" That is not useful to restore default cpu model. This patch fixes above issue. Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com> (crobinso: minor cleanup, add Ken to AUTHORS)
-rw-r--r--AUTHORS1
-rw-r--r--src/virtManager/domain.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index ddf48160..adaeb1c5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -89,6 +89,7 @@ Further patches have been submitted by:
David Shane Holden <dpejesh@yahoo.com>
Dave Allan <dallan@redhat.com>
John Doyle <spdubhghaill@gmail.com>
+ Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
<...send a patch & get your name here...>
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index 947cdf8e..385fdffd 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -459,6 +459,10 @@ class vmmDomain(vmmLibvirtObject):
guest.cpu.vendor = vendor
guest.cpu.model = model or None
+ if guest.cpu.model is None:
+ for f in guest.cpu.features:
+ guest.cpu.remove_feature(f)
+ return
origfeatures = guest.cpu.features
def set_feature(fname, fpol):