import libvirt
from xml.etree import ElementTree as ET
URI = 'qemu:///system'
VM = 'truffles'
conn = libvirt.open(URI)
domain_object = conn.lookupByName(VM)
vm_xml = domain_object.XMLDesc(0)
root = ET.fromstring(vm_xml)
disk_source = root.find('./devices/disk/source')
volume_in_use = disk_source.get('file')
print(volume_in_use)
libvirt — Определение объема, который использует домен через API