Proper XML for compareCPU method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All -

What is the proper XML to supply to the Python Connections compareCPU method? I have looked at the cpu_map.xml file and I believe I have the proper XML configured but the method always throws an exception with a missing CPU architecture error. Here is the code.

from __future__ import print_function
import sys
import libvirt

conn = libvirt.open('qemu:///system')
if conn == None:
    print('Failed to open connection to qemu:///system', file=sys.stderr)
    exit(1)

retc = conn.compareCPU('<cpu><arch name="x86"><model name="kvm64"/></arch></cpu>')

if retc == -1:
    print("CPUs are not the same.")
else:
    print("CPUs are the same.")

conn.close()
exit(0)

This probably just a simple error on my part but I have tried more that a few permutations of the XML with no success. So I guess I need some help with this.

Thanks,
David Ashley

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux