In my earlier post, I described how I use my laptop as a mobile server. One of the optimizations I’ve applied is the use of templates and linked clones within VMware Workstation 7. Using templates and linked clones gives you a couple of advantages:

  • Saves you time: no need to install the Guest OS every time you need a clean virtual machine.
  • Saves you disk space: the template takes up the normal amount of disk space, as it contains the complete Guest OS. The linked clone only takes up a relatively small amount of disk space, as it contains only the changed data.

Creating a Virtual Machine

Create a virtual machine to your liking. I’ve used the following values:

Installing a guest OS in the Virtual Machine

Install a Guest OS like you want it. I’ve installed Microsoft Windows Server 2003 R2 Enterprise Edition SP2 in English. Make sure to install the VMware Tools. If you are planning to use this virtual machine in an Active Directory domain, you need to have a way to change the SID of the cloned machine, as VMware Workstation, unlike vCenter Server doesn’t do that for you. I’ve copied ‘newsid.exe’ to the desktop for this purpose.

Marking the VM as a template

Enabling Template Mode is merely a protection against accidental deletion of the parent VM (i.e. the template).

Make a snapshot of the VM

When you’re completely done with the virtual machine, and you’ve marked the VM as a template, you’re ready to create a snapshot.

Deploying a virtual machine based on a template