[PATCH] [TEST] Fixing main.py to work with F10 libvirt

# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1229507881 28800 # Node ID 9b8544cbb28b3c690d1973e90f5c048fd9eb7214 # Parent 3bef4df8290571505d2c9028b6c82e0abc8b2e74 [TEST] Fixing main.py to work with F10 libvirt. The query virsh -c qemu:///system version does not work with latest libvirt on F10. Hence modified the main.py to use -v option instead. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r 3bef4df82905 -r 9b8544cbb28b suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Dec 15 09:45:28 2008 -0800 +++ b/suites/libvirt-cim/main.py Wed Dec 17 01:58:01 2008 -0800 @@ -96,7 +96,7 @@ if ret != 0: return "This libvirt install does not support %s" % virt - cmd = "virsh -c %s version" % virt2uri(virt) + cmd = "virsh -c %s -v" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "Encountered an error querying libvirt with: %s" % cmd

diff -r 3bef4df82905 -r 9b8544cbb28b suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Dec 15 09:45:28 2008 -0800 +++ b/suites/libvirt-cim/main.py Wed Dec 17 01:58:01 2008 -0800 @@ -96,7 +96,7 @@ if ret != 0: return "This libvirt install does not support %s" % virt
- cmd = "virsh -c %s version" % virt2uri(virt) + cmd = "virsh -c %s -v" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "Encountered an error querying libvirt with: %s" % cmd
Running the version command indicates where the proper qemu/kvm packages are installed. Without kvm and qemu: ============= # /usr/bin/virsh -c qemu:///system version libvir: error : could not connect to qemu:///system error: failed to connect to the hypervisor /usr/bin/virsh -c qemu://system -v 0.5.1 Without kvm with qemu or with kvm without qemu: ======================= # /usr/bin/virsh -c qemu:///system version Compiled against library: libvir 0.5.1 Using library: libvir 0.5.1 Using API: QEMU 0.5.1 error: failed to get the hypervisor version #/usr/bin/virsh -c qemu://system -v 0.5.1 What version of libvirt are you using? My rpm is: libvirt-0.5.1-1.fc11.x86_64 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
diff -r 3bef4df82905 -r 9b8544cbb28b suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Dec 15 09:45:28 2008 -0800 +++ b/suites/libvirt-cim/main.py Wed Dec 17 01:58:01 2008 -0800 @@ -96,7 +96,7 @@ if ret != 0: return "This libvirt install does not support %s" % virt
- cmd = "virsh -c %s version" % virt2uri(virt) + cmd = "virsh -c %s -v" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "Encountered an error querying libvirt with: %s" % cmd
Running the version command indicates where the proper qemu/kvm packages are installed.
Without kvm and qemu: ============= # /usr/bin/virsh -c qemu:///system version libvir: error : could not connect to qemu:///system error: failed to connect to the hypervisor
/usr/bin/virsh -c qemu://system -v 0.5.1
Without kvm with qemu or with kvm without qemu: ======================= # /usr/bin/virsh -c qemu:///system version Compiled against library: libvir 0.5.1 Using library: libvir 0.5.1 Using API: QEMU 0.5.1 error: failed to get the hypervisor version
#/usr/bin/virsh -c qemu://system -v 0.5.1
What version of libvirt are you using? My rpm is: libvirt-0.5.1-1.fc11.x86_64 I have the following rpm installed on the machine.
Sorry I missed noticing the verification of the qemu, kvm packages by the version option. libvirt-0.5.0-1.fc10.x86_64 Also, the KVM and QEMU are also installed on the machine. Thanks and Regards, Deepti.
participants (3)
-
Deepti B Kalakeri
-
Deepti B. Kalakeri
-
Kaitlin Rupert