hil icon indicating copy to clipboard operation
hil copied to clipboard

Implement headnode thin provisioning in HaaS

Open henn opened this issue 10 years ago • 0 comments

If we create a read-only qcow2 for each base headnode image, we can then use the tooling to create thin copies of that to save space.

Based on http://www.greenhills.co.uk/2013/03/24/cloning-vms-with-kvm.html

# Create the readonly base
sudo qemu-img convert -O qcow2 /dev/vg_vms/ubuntu-base-vm /var/lib/libvirt/images/ubuntu-base-vm-readonly.qcow2
sudo chmod u-w /var/lib/libvirt/images/ubuntu-base-vm-readonly.qcow2
# Create a thin provision
VM=vm114
sudo qemu-img create -f qcow2 -b /var/lib/libvirt/images/ubuntu-base-vm-readonly.qcow2 /var/lib/libvirt/images/$VM.qcow2
# XML stuff here

henn avatar Nov 17 '15 18:11 henn