[libvirt-users] Libvirt in Windows not working

arpita k arpitak29 at gmail.com
Tue Feb 8 04:21:07 UTC 2011


Hi,

This is Arpita.

I am using Libvirt API in the Windows Vista system.VMware is installed over
there.I have installed Libvirt and Python 2.6 in the Windows Vista system
andhave written a small test file in Python.

Here is the code:

import libvirt*
*

import sys

conn = libvirt.openReadOnly(None)

if conn == None:

print *'Failed to open connection to the hypervisor'
*

sys.exit(1)

try:

dom0 = conn.lookupByName(*"vmware1"*)

except:

print *'Failed to find the main domain'
*

sys.exit(1)

print *"Domain 0: id %d running %s"* % (dom0.ID(), dom0.OSType())

print dom0.info()

When I am trying to execute this python code I received error message that :

ImportError: No module named libvirt



Please help me.



Regards,

Arpita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20110208/62886499/attachment.htm>


More information about the libvirt-users mailing list