[libvirt-users] Is it possible to get the vm which is using a storage pool's volume?
Eric Blake
eblake at redhat.com
Mon Apr 14 14:56:53 UTC 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140414/de50c580/attachment.sig>
More information about the libvirt-users
mailing list