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