Re: unable to get domain list of KVM guests from libvirt as non-root user

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

 



On 03/12/2010 09:18 AM, Daniel Veillard wrote:

When I try the same thing on the KVM server:

[testu@kvm ~]$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
   >>>  import libvirt
   >>>  conn = libvirt.openReadOnly(None)
14:33:07.303: error : No vport operation path found for host0
14:33:07.320: error : No vport operation path found for host4
14:33:07.325: error : No vport operation path found for host3
14:33:07.367: error : No vport operation path found for host1
14:33:07.368: error : No vport operation path found for host2

   http://libvirt.org/uri.html

try libvirt.openReadOnly("qemu:///system")

That fixed it, thanks!

sh-3.2$ python
Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.openReadOnly("qemu:///system")
>>> domains = conn.listDomainsID()
>>> print domains
[14, 8, 13]
>>>


Looks like I used an example from the wrong page:

http://www.libvirt.org/python.html

Tom


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

  Powered by Linux