python equiv to perl list_domains()

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

 



Hey,

I'm trying to figure out a way to get a list of the running domains on a dom0. I can get the ID's but I'd prefer the names. We have another script written in perl, but I'm trying to get some other functionality in python as well as work on converting it all to python. It looks like perl has a list_domains() that will, according to the libvirt doc, "Return a list of all running domains currently known to the VMM". And this works for us, but I can't get the same thing in python as listAllDomains doesn't work with the version of libvirt running on RHEL 5.9

From our machine that will be running the script
RHEL 5.9
yum list | grep libvirt
libvirt.x86_64          0.8.2-29.el5_9.1
libvirt-python.x86_64   0.8.2-29.el5_9.1


from the dom0
RHEL 5.9
yum list | grep xen
xen.x86_64                  3.0.3-142.el5_9.2
xen-libs.i386               3.0.3-142.el5_9.2
xen-libs.x86_64             3.0.3-142.el5_9.2

yum list | grep libvirt
libvirt.i386                0.8.2-29.el5_9.1 installed                          
libvirt.x86_64              0.8.2-29.el5_9.1 installed  


This is the error if I try to do listAllDomains from a FC18 box
>>> conn.listAllDomains(1)
libvir: Remote Driver error : unknown procedure: 273
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3695, in listAllDomains
    raise libvirtError("virConnectListAllDomains() failed", conn=self)
libvirt.libvirtError: unknown procedure: 273

_______________________________________________
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