Deploying VMs using the thin provisioning method
Perform the following steps to get started with VM deployment using the thin provisioning method:
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
Verify that the backing file attribute for newly created
qcow2
images is pointing correctly to the image/vms/win7.raw
, using theqemu-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
Now deploy the virtual machines named
Windows1
andWindows2
using thevirt-clone
command:virt-clone --original-xml=/root/small.xml -f /vms/vm1.qcow2 -n Windows7-01 --preserve-data virt-clone --original-xml=/root/large.xml -f /vms/vm2.qcow2 -n Windows7...