Bug 723540 - RFE: allow capabilities/guest XML to be used with virsh cpu-compare
Summary: RFE: allow capabilities/guest XML to be used with virsh cpu-compare
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 731151
TreeView+ depends on / blocked
 
Reported: 2011-07-20 14:12 UTC by Etienne Servais
Modified: 2016-03-23 13:30 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 731151 (view as bug list)
Environment:
Last Closed: 2016-03-23 13:30:26 UTC
Embargoed:


Attachments (Terms of Use)
The <host> part of rhe "virsh capabilities" output (4.53 KB, text/xml)
2011-07-20 14:12 UTC, Etienne Servais
no flags Details

Description Etienne Servais 2011-07-20 14:12:21 UTC
Created attachment 514014 [details]
The <host> part of rhe "virsh capabilities" output

Description of problem:

cpu-compare fails to compare host CPU with any xml configuration file. Attached are the <host> part of the "virsh capabilities" output and a dumpxml of a running vm.

Version-Release number of selected component (if applicable):

Compiled from a git snapshot of the 0.9.3, sha1sum is 
11f94b9213440ac5b06161f8e4d07955e481ee81  libvirt-git-snapshot.tar.gz

How reproducible:

I didn't get it working

Steps to Reproduce:
1.virsh capabilities > capabilities.xml
2.virsh dumpxml VirtualTest > VirtualTest.xml
3.virsh cpu-compare capabilities.xml
Or
3.virsh cpu-compare VirtualTest.xml
  
Actual results:

Error :Failed to compare host CPU with input.xml
Error :internal error XML does not contain expected 'cpu' element

Expected results:
A comparison...


Additional info:
In the xml file, the cpu flag contains a "match" field. This could have lead to the error. However, in the capabilities, the cpu flag is a pure <cpu> </cpu> flag.
The error has been introduced with this patch : 
http://permalink.gmane.org/gmane.comp.emulators.libvirt/23032

The result has been obtained on ubuntu 11.04 64bits on a Xeon E5520
Running qemu 0.14.0

Kind regards

Comment 1 Etienne Servais 2011-07-25 08:19:28 UTC
I finally understood it...

It's just that cpu-compare needs the <cpu> flag to be the root flag of the document... 

Couldn't we change it so we may compare the output of a dumpxml to a host cpu ?

Kind regards

Etienne

Comment 2 Jiri Denemark 2011-08-03 14:59:13 UTC
This seems like a useful addition, esp. considering that virsh cpu-baseline supports this.

Comment 3 Cole Robinson 2016-03-23 13:30:26 UTC
Was fixed with:

commit 882e768ef0b2b11feeeab7fda0c5b5a3224ed57b
Author: Peter Krempa <pkrempa>
Date:   Thu Sep 15 09:18:04 2011 +0200

    virsh: Allow using domain and capabilities XMLs with cpu-compare


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