Panduan

  1. Periksa base image
qemu-img info /data/vms/example.qcow2

Contoh

image: /data/vms/example.qcow2
file format: qcow2
virtual size: 50 GiB (53687091200 bytes)
disk size: 324 KiB
cluster_size: 65536
backing file: /data/isos/template-ubuntu20.img
backing file format: qcow2
Format specific information:
    compat: 0.10
    refcount bits: 16
  1. Periksa target image VM
# virsh domblklist <nama_vm/domain>
virsh domblklist example

Contoh

 Target   Source
---------------------------------------------
 vda      example.qcow2
 hdd      /data/vms/sd-runner-cloudinit.iso
  1. Pastikan VM dalam kondisi menyala dan mulai flatten image
# virsh blockpull <nama_vm/domain> vda --wait
virsh blockpull example vda --wait
  1. Verifikasi
qemu-img info /data/vms/example.qcow2

Contoh

image: /data/vms/example.qcow2
file format: qcow2
virtual size: 50 GiB (53687091200 bytes)
disk size: 3.15 GiB
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16

Referensi