[libvirt-users] How to list and change domain's disk image file

Ricardo Hillbrecht ricardohillb at gmail.com
Tue Jun 12 02:20:22 UTC 2012


Hi

I'm writing a C program using libvirt API and need to list the storage
volumes used by each domain. I'm wondering if there is a way to do
this better of searching the XML strings of all domains, does anyone
can suggest me something ?

I also need to create a function to change the img file of a given
domain. I intend to do the following:

1. virDomainGetXMLDesc (domain)
2. change the XML to other img file
3. virDomainUndefine (domain)
4. virDomainCreateXML (changed XML)

Am i correct doing this ? There is a better method ?

Thanks

Ricardo




More information about the libvirt-users mailing list