I've been doing something today which makes me realise I've missed something obvious about managing disks for Linux VMs. It's this: by having separate virtual home disks from root disks, you can remap the same home disk to different root disks and so have a stable virtual disk with all your source code, which you can then bring up in different linux distros (Centos 5.5, RHEL6, Ubuntu), and run the tests against these VMs, without having to have three separate home directories in three different virtual disks, each checking out and testing the code.
This is fairly profound from a dev and test perspective. Up until now I've had separate VMs, which you have to update, check out from SCM the source, test, etc. Now I can have one disk which I can remap to whichever OS I want to work with for that period, then flip back. With the stuff in the home dir all portable, the same linux apps on the different machines, then provided they don't do one-way conversions on local configuration files, I can switch dev platforms in under a minute.
The best bit: how trivial it is to implement. Take an existing image, create a new 8 GB virtual disk. Grab the gparted live CD, boot a VM with that CD ISO image, create and format the new ext3 partition. Then boot the Linux VM as normal, mount the hard drive somewhere, then use rsync -a
to copy the old home directory contents to the new one. Reboot the VM with the new disk mounted at /home, and there we have it. Flexible decoupling of home drives (work) from OS VMs, in about 15 minutes, including the gparted download and revising the rsync commands.
This is so profound that if I didn't have a phone conference coming up I'd have to lie down. Actually, as it is only a phone conference, I could still lie down and only the people in the room would give me funny looks