+++ This bug was initially created as a clone of Bug #613760 +++ Clone of a corresponding bug fixed in RHEL-6... The following XML is wrong since 'match' attribute is allowed only for guest CPUs and 'arch' element is only allowed for host CPUs: <cpu match="minimum"> <arch>i686</arch> <model>pentium</model> </cpu> When running virsh cpu-compare on this XML, libvirt silently ignores the 'match' attribute and treats the XML as describing a host CPU. An error should be returned instead.
Fix built into libvirt-0.8.2-4.el5
Verified this bug on RHEL5u6-Server-20100930.0-x86_64-kvm - kernel-2.6.18-225.el5 - kvm-83-200.el5 - libvirt-0.8.2-6.el5 Test steps: 1. # cat pentium.xml <cpu match="minimum"> <model>pentium</model> </cpu> 2. # virsh cpu-compare pentium.xml Actual result: 2. Output error: Failed to compare host CPU with pentium.xml error: XML description for 'arch' element element cannot be used inside 'cpu' element with 'match' attribute' is not well formed or invalid
(In reply to comment #3) I think some error about xml file for step 1. Should change Test step 1 to the following to get correct output: 1. # cat pentium.xml <cpu match="minimum"> <arch>i686</arch> <model>pentium</model> </cpu> Then execute step 2 and the correct output like comment #3 will display.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2011-0060.html