Red Hat Bugzilla – Bug 611401
cpuCompareXML reports pentium host is incompatible with a core2duo host
Last modified: 2010-11-11 09:50:15 EST
Description of problem:
On a host that happily runs pentium guests, cpuCompareXML fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
<topology sockets='1' cores='2' threads='1'/>
# virsh cpu-compare /tmp/pentium.xml
CPU described in /tmp/pentium.xml is incompatible with host CPU
CPU is compatible
02:29:22.157: debug : virConnectCompareCPU:11869 : conn=0x7fee9009ec80, xmlDesc=<cpu match='minimum'><arch>i686</arch><model>pentium</model></cpu>
02:29:22.157: debug : cpuCompareXML:77 : host=0x2543dd0, xml=<cpu match='minimum'><arch>i686</arch><model>pentium</model></cpu>
02:29:22.157: debug : cpuCompare:110 : host=0x2543dd0, cpu=0x7fee88002400
02:29:22.161: debug : x86Compute:968 : Host CPU provides forbidden features in CPUID function 0x1
You need to specify guest cpu without the <arch> element. Specifying arch is only allowed for host CPUs. However, I admit that the error is pretty confusing so it needs to be fixed.
Shouldn't it be treating 'i686' guest arch as compatible with 'x86_64' host arch ?
It turns out there are two things involved:
1) as suggested in comment 2 is that libvirts does not print an error when both 'match' attribute and 'arch' element are used in one 'cpu' element and just ignores the match attribute in that case and treats the XML as host CPU definition
2) comparing host CPUs is wrong, which is the cause for "Host CPU provides forbidden features in CPUID function 0x1" message
The second issue is fixed upstream by http://libvirt.org/git/?p=libvirt.git;a=commit;h=ac3daf0899cced61faeeed3c6e14806d9e846174
I'll clone this bz for the first issue.
libvirt-0_8_1-14_el6 has been built in RHEL-6-candidate with the fix.
Verified this bug PASS with:
Verified with libvirt-0.8.1-27.el6.x86_64.
# cat cpu-pentium.xml
# virsh cpu-compare cpu-pentium.xml
Host CPU is a superset of CPU described in cpu-pentium.xml
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.