Virsh Vol
Zur Navigation springen
Zur Suche springen
List a Volume Pool
- virsh vol-list default
Name Path ------------------------------------------------------------------------------ elan.foreman.lan-disk1 /var/lib/libvirt/images/elan.foreman.lan-disk1 vol-new /var/lib/libvirt/images/vol-new vol-new.qcow2 /var/lib/libvirt/images/vol-new.qcow2
Create a qcow2 image
- virsh vol-create-as default vol-new.qcow2 10G --format qcow2
Create a raw image
- virsh vol-create-as default vol-new.raw 10G --format raw
Clone a Volume
- virsh vol-clone vol-new vol-clone
Dumo XML from a Volume
- virsh vol-dumpxml --vol vol-new.raw --pool default
<volume type='file'> <name>vol-new.raw</name> <key>/var/lib/libvirt/images/vol-new.raw</key> <source> </source> <capacity unit='bytes'>10737418240</capacity> <allocation unit='bytes'>10737422336</allocation> <target> <path>/var/lib/libvirt/images/vol-new.raw</path> <format type='raw'/> <permissions> <mode>0600</mode> <owner>0</owner> <group>0</group> </permissions> <timestamps> <atime>1508272953.383646344</atime> <mtime>1508272953.371646487</mtime> <ctime>1508272953.375646440</ctime> </timestamps> </target> </volume>
Delete a Volume
- virsh vol-delete --vol vol-new.raw --pool default
Vol vol-new.raw deleted
Info from a Volume
- virsh vol-info walden.qcow2 --pool default
setlocale: No such file or directory Name: walden.qcow2 Type: file Capacity: 15.00 GiB Allocation: 1.68 GiB
Download Volume (Vorsicht BUG)
- virsh vol-download --pool default walden.qcow2 /tmp/myimage.qcow2