On 04/14/2014 02:52 AM, Pasquale Dir wrote:
> Hello,
> how can I programmatically get the vm which is currently using a storage
> volume? I looked at the apis but I can't find anything about it.

No one has contributed such an API yet, although I think it would be a
welcome addition.  For now, the best you can do is list all domains and
parse their XML to see if any of their disks refer to a file that lines
up with any of the storage volumes.  Not pretty, but virt-manager
already has code that does this (in the python bindings), if you want to
use that as a starting point.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

Reply via email to