Bug 885009 - Fail to change cpu model to blank if guest has additional cpu features defined
Summary: Fail to change cpu model to blank if guest has additional cpu features defined
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: virt-mgr-maint
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-07 09:27 UTC by tingting zheng
Modified: 2014-01-27 15:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-27 15:02:53 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description tingting zheng 2012-12-07 09:27:06 UTC
Description of problem:
Fail to change cpu model to blank if guest has additional cpu features defined

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-18.el6.x86_64
libvirt-0.10.2-11.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Open virt-manager, make sure a guest is in shutdown status
2. Open guest details page, Click Processor -> Configuration,by default,the cpu model is blank,click Copy host CPU configration, Then the host CPU configuration value will display in model textbox. Such as Penryn. Then Apply.
3. Change cpu model to blank,error shows:"Error changing VM configuration: internal error Non-empty feature list specified without CPU model".

debug info:
#virt-manager --debug
……
--- Original XML 
+++ New XML 
@@ -55,4 +55,26 @@
       <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
     </memballoon>
   </devices>
+  <cpu match="exact">
+    <model>Penryn</model>
+    <vendor>Intel</vendor>
+    <feature policy="require" name="tm2"/>
+    <feature policy="require" name="est"/>
+    <feature policy="require" name="monitor"/>
+    <feature policy="require" name="osxsave"/>
+    <feature policy="require" name="smx"/>
+    <feature policy="require" name="ss"/>
+    <feature policy="require" name="vme"/>
+    <feature policy="require" name="dtes64"/>
+    <feature policy="require" name="ht"/>
+    <feature policy="require" name="ds"/>
+    <feature policy="require" name="pbe"/>
+    <feature policy="require" name="xsave"/>
+    <feature policy="require" name="tm"/>
+    <feature policy="require" name="pdcm"/>
+    <feature policy="require" name="vmx"/>
+    <feature policy="require" name="ds_cpl"/>
+    <feature policy="require" name="xtpr"/>
+    <feature policy="require" name="acpi"/>
+  </cpu>
 </domain>

2012-12-07 15:13:50,313 (libvirtobject:135): Redefining 'test' with XML diff:
--- Original XML 
+++ New XML 
@@ -14,8 +14,6 @@
     <pae/>
   </features>
   <cpu mode="custom" match="exact">
-    <model fallback="allow">Penryn</model>
-    <vendor>Intel</vendor>
     <feature policy="require" name="tm2"/>
     <feature policy="require" name="est"/>
     <feature policy="require" name="monitor"/>

2012-12-07 15:13:50,317 (error:80): dialog message: Error changing VM configuration: internal error Non-empty feature list specified without CPU model : Error changing VM configuration: internal error Non-empty feature list specified without CPU model

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 2333, in _change_config_helper
    self.vm.redefine_cached()
  File "/usr/share/virt-manager/virtManager/domain.py", line 326, in redefine_cached
    self._redefine_xml(xml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 147, in _redefine_xml
    return self._redefine_helper(origxml, newxml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 137, in _redefine_helper
    self._define(newxml)
  File "/usr/share/virt-manager/virtManager/domain.py", line 775, in _define
    self.conn.define_domain(newxml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 813, in define_domain
    return self.vmm.defineXML(xml)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2660, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: internal error Non-empty feature list specified without CPU model

Actual results:
Fail to change cpu model to blank if guest has additional cpu features defined

Expected results:
Can change cpu model to blank if guest has additional cpu features defined

Additional info: 
If you delete all the feature policy defined in xml,then can change cpu model to blank.

Comment 1 Giuseppe Scrivano 2014-01-27 15:02:53 UTC
There is some work upstream to change the way virt-manager allows users to change the CPU model type (and to what extend it can be customized).  The patch won't probably be that trivial to be backported and it is better to avoid two different implementations for this issue.  Closing it.


Note You need to log in before you can comment on or make changes to this bug.