On Jun 10, 2013, at 10:02 PM, Glen Barber wrote: > On Mon, Jun 10, 2013 at 09:25:39PM -0700, Tim Kientzle wrote: >>> • Crochet with VM images [TimKeintzle], [GlenBarber], [ColinPercival] >> >> Per Colin, there's no way for "mere mortals" to upload machine >> images to Amazon, so there's little point in pursuing that. >> >> I did recently add support to Crochet for building VMWare VM images >> directly. Works pretty well; I've been using it to build throw-away >> images for testing. This goes a step further than what Glen >> has recently announced; so far, he's just building the VMDK disk >> image, Crochet fills in the rest of the VM configuration files. >> >> It should be routine to duplicate the approach to support other >> VM environments (e.g., Parallels, VirtualBox, OFA). My time is >> limited but I'm happy to assist if someone else wants to work on it. >> > > I do intend to look at how Crochet does this, because I think your > implementation is far more user friendly and cross-application > compatible. > > I'll certainly pick your brain on it, if you don't mind.
Key point: VM images are directories which contain a number of different files. The disk image is just one of those. For VMWare (and others I've looked at), the VM directory contains: * Disk image - this can be a straight disk image (which is what Crochet currently uses) or a structured/sparse/compressed "virtual disk" * Disk descriptor -- this specifies the format of the disk image and the parameters of the virtual disk drive. * VM descriptor -- this describes the rest of the virtual hardware. VMWare seems to be the simplest of the ones I've looked at: the descriptor files are lists of key/value pairs and the VMWare software can boot a VM even from a pretty skeletal definition. It didn't take me very many tries to get Crochet to build a VMWare image that VMWare Fusion was comfortable booting. It helps that the VMWare file formats are pretty well documented: In particular: http://sanbarrow.com Parallels and OFA both use more complex XML configuration files -- everything has an ID and there are lots of cross-references. I've toyed with building Parallels VMs but haven't gotten very far yet. qemu-img seems like a nice tool for generating a virtual disk image, but it doesn't currently know how to create compressed VMWare disks. I've skimmed VMWare's documentation and it doesn't look too hard to build a compressed VMWare disk if someone would like to tackle that. ;-) Tim
signature.asc
Description: Message signed with OpenPGP using GPGMail