Virsh Vol: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 14: | Zeile 14: | ||
=Clone a Volume= | =Clone a Volume= | ||
*virsh vol-clone vol-new vol-clone | *virsh vol-clone vol-new vol-clone | ||
| + | =Dumo XML from a Volume= | ||
| + | *virsh vol-dumpxml --vol vol-new.raw --pool default | ||
| + | <pre> | ||
| + | <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> | ||
| + | </pre> | ||
=Links= | =Links= | ||
*https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/Virtualization_Deployment_and_Administration_Guide/sect-Managing_guest_virtual_machines_with_virsh-Storage_Volume_Commands.html | *https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7-Beta/html/Virtualization_Deployment_and_Administration_Guide/sect-Managing_guest_virtual_machines_with_virsh-Storage_Volume_Commands.html | ||
Version vom 18. Oktober 2017, 05:18 Uhr
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>