Linked Clones for VMware Fusion with Somatic

Update: As of Fusion 6, this utility is no longer needed, as Fusion 6 includes proper cloning capabilities.

In the course of my day job, I need to be able to create VMs to try out my companies software as well as show customers how they might use our products to solve their problems.  To speed up the process of creating new and one-off VMs, I created a little utility called Somatic to help me do that much faster and by using much less disk space than copying a VM.

I use a Mac and, since the company that I work for produces a pretty good desktop virtualization solution for the Mac, I use VMware Fusion to host my VMs.  One challenge that I have is that those VMs take up a lot of space per VM, and that eats up the SSD in my MacBook fairly quickly.

VMware Workstation for Windows has a fairly nice feature that allows you to create VMs that are based on other VMs called Linked Clones.  Linked Clones allow you to create separate VM that points to the disks of another VM at a particular point in time.  This new VM then uses a set of very thin disk images that only contain the changes that it makes to the blocks of the source disks.  This means that the space used by the new VM is only just what is needed for that VM.

Somatic allows me to create a base VM image that has all the basic OS parts I typically don't change that often, and then create linked clones to that image that only take up a few hundred megabytes instead of the multiple gigabytes a full copy would take.  Also, linked clones setup much faster than a full copy, so I can quickly create a number of similar VMs to test out ideas with multiple machines.

The initial release of Somatic supports created full clones (copies) and linked clones of VMs.  The source VM for a linked clone must have at least one snapshot, and can only have one disk right now.  Future releases may address these limitations unless the Fusion team adds the linked cloning capability into the product.

If you want to see how I created this utility, you can also clone the Somatic Git repo and have a look at the source in the AppleScript editor.

Hopefully you find the utility useful!  If you have feedback, feel free to open issues at the github repo for Somatic.


Popular posts from this blog

Ghetto Cloud Foundry Home Lab

Using Snapshot Isolation with SQL Server and Hibernate

Fedora, Ant, and Optional Tasks