Anatoliy Guskov
2011-Aug-06 20:34 UTC
[libvirt-users] Create volume wit libvirt API for Python
Please help! How create volume with libvirt API for python? conn = libvirt.open(qemu:///system) vol = libvirt.virStoragePool(conn) conf_file = 'disk.xml' f = open(conf_file) xml = f.read() pool = "default" vol.createXML(pool,xml) xml file disk.xml: <volume> <name>name.img</name> <key>/var/lib/libvirt/images/name.img</key> <source> </source> <capacity>21474836480</capacity> <allocation>21474840576</allocation> <target> <path>/var/lib/libvirt/images/name.img</path> <format type='raw'/> </target> </volume> This script not work :-( Thanks for help!
Maybe Matching Threads
- creation of storage volume fails
- Re: [libvirt] Creating a storage volume for raw format file
- Re: [libvirt] Creating a storage volume for raw format file
- [Q] how to manage Infiniband disk(SRP) volume wit libvirt.
- Permission denied for volume create in raw format