Table of Contents

Disks/Images layout in VMs

This is a layout I've starting using on my VMs. I use this scheme to waste as little space on the host as possible and to allow me easy “rollback” to a clean system.

The process I follow is:

Writes should be kept at a minimum before compressing so that no ghost data needs to be recompressed.
I install, exit the VM, snapshot, re-create the clean installation, compressed (compression requires re-creation/copy); create a linked image to be used instead of the clean image (this linked image will store the changes to the base image) and then start using the VM.
This allows me to use the same base image for different set-ups since changes will be written to a separate image (maybe could run even simultaneously although I'm not sure about the performance penalty).

Additionally I use a separate image for swap so that swapped data doesn't get written to the other images (hindering compression).

Finally I use a third image for /home so that I can rollback the OS without affection homes. I set it up as an LVM volume to allow future expansion with even more images :-P

Initial image creation

Post-installation

1) Note snapshotting takes a *lot* of time