[libvirt] Investigate VM via Libvirt API

Yaniv Hadad YANIVH at il.ibm.com
Sun Jun 23 05:58:26 UTC 2013


Thanks Richard for this example.
Do you know hoe can I investigate the storage \ space allocation for 
single instance ?

Yaniv


Yaniv Hadad
Servers & Network Group, IBM R&D Labs in Israel
Software Devloper
yanivh at il.ibm.com, +972-4-829-65947
Fax: +972-4-829-6111, Cell: +972-50-4078908




 



From:   "Richard W.M. Jones" <rjones at redhat.com>
To:     Yaniv Hadad/Haifa/IBM at IBMIL, 
Cc:     libvir-list at redhat.com
Date:   21/06/2013 05:39 PM
Subject:        Re: [libvirt] Investigate VM via Libvirt API



On Thu, Jun 20, 2013 at 01:42:06PM +0300, Yaniv Hadad wrote:
> Hi All,
> 
> I am Java developer that want to start working with Libvirt API.
> My first target is to investigate Host + all his instances. 
> (CPU,Storage,Network,State,Name..etc.)
> Can some one give me good code example or article for that purpose.
> 
> I prefer to use Java , but , python is also good for this target

The Java API works the same as the C API.

Here is an example program in Java:

http://libvirt.org/git/?p=libvirt-java.git;a=blob;f=src/test/java/test.java;h=3442becb01a325633ea4a5d499fbe4390ab06c54;hb=HEAD


(Look for conn.listDefinedDomains etc)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat 
http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130623/029af194/attachment-0001.htm>


More information about the libvir-list mailing list