<div dir="ltr">Hey,<div><br></div><div>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</div>
<div><br></div><div style>From our machine that will be running the script</div><div style>RHEL 5.9</div><div><div>yum list | grep libvirt</div><div>libvirt.x86_64          0.8.2-29.el5_9.1</div><div>libvirt-python.x86_64   0.8.2-29.el5_9.1</div>
</div><div><br></div><div><br></div><div style>from the dom0</div><div style>RHEL 5.9</div><div style><div>yum list | grep xen</div><div>xen.x86_64                  3.0.3-142.el5_9.2</div><div>xen-libs.i386               3.0.3-142.el5_9.2</div>
<div>xen-libs.x86_64             3.0.3-142.el5_9.2</div><div><br></div></div><div><div>yum list | grep libvirt</div><div>libvirt.i386                0.8.2-29.el5_9.1 installed                          </div><div>libvirt.x86_64              0.8.2-29.el5_9.1 installed  </div>
</div><div><br></div><div><br></div><div style>This is the error if I try to do listAllDomains from a FC18 box</div><div><div>>>> conn.listAllDomains(1)</div><div>libvir: Remote Driver error : unknown procedure: 273</div>
<div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3695, in listAllDomains</div><div>
    raise libvirtError("virConnectListAllDomains() failed", conn=self)</div><div>libvirt.libvirtError: unknown procedure: 273</div></div><div><br></div></div>