Deploying VMs using the thin provisioning method

Perform the following steps to get started with VM deployment using the thin provisioning method:

  1. Create two new qcow2 images using /vms/win7.raw as the backing file:
    # qemu-img create -b /vms/win7.img -f qcow2 /vms/vm1.qcow2
    #qemu-img create -b /vms/win7.img -f qcow2 /vms/vm2.qcow2
    
  2. Verify that the backing file attribute for newly created qcow2 images is pointing correctly to the image /vms/win7.raw, using the qemu-img command:
    qemu-img info /vms/vm2.qcow2
    image: /vms/vm2.qcow2
    file format: qcow2
    virtual size: 10G (10737418240 bytes)
    disk size: 196K
    cluster_size: 65536
    backing file: /vms/win7.img
    Format specific information:
      compat: 1.1
      lazy refcounts: false
      refcount bits: 16
      corrupt: false

Get Mastering KVM Virtualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.