Loading...
 
[Zobrazit/Skrýt nabídky vlevo]
[Zobrazit/Skrýt nabídky vpravo]

LibvirtCreateQCOWOverlay

To enable full write access to a read-only device (e.g. backup) within a libvirt domain, create a QCOW2 overlay on top of a read-only device

qemu-img create -b <backend_ro_device_path> -f qcow2 <qcow_overlay_file_path>


For example, to overlay a read-only device /dev/vg_cluster/disk, write

qemu-img create -b /dev/vg_cluster/disk -f qcow2 /cluster/kvm/images/disk_overlay.qcow


This will create a sparse file /cluster/kvm/images/disk_overlay.qcow.

In libvirt, create a disk device section as follows

<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='<qcow_overlay_file_path>'/>
      <target dev='sda' bus='virtio'/>
</disk>


Created by dfabian. Last Modification: Středa 27 of červenec, 2016 10:27:56 CEST by dfabian.