[libvirt-users] Create volume wit libvirt API for Python

6 Aug
2011
6 Aug
'11
10:34 p.m.
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!
5153
Age (days ago)
5153
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anatoliy Guskov