VMware Workstation 7 and Templates/Linked Clones

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

    8 Responses to “VMware Workstation 7 and Templates/Linked Clones”

    1. Duane Haas Says:

      Not sure if you have caught this article, but you shouldnt need to use newsid anymore.

      http://blogs.technet.com/markrussinovich/archive/2009/11/03/3291024.aspx


    2. Joep Piscaer Says:

      I’ve read the article, and am aware of the discontinuation of newsid. However, I’m simply too lazy to use sysprep. For a simple scenario like above, I believe newsid suffices. For actual production environments, I continue to use Sysprep.


    3. Duane Haas Says:

      not a problem, was just curious. i was just going through the comments, and it sparked a war among people. always good to debate stuff


    4. Erik Bakker Says:

      try using windows 2008 R2 and newsid… doesnt work anymore :) (bsod) so sysprep is the only option


    5. Joep Piscaer Says:

      Hmm, I didn’t know W2008r2 had such trouble with newsid. Maybe I should consider using sysprep for all windows templates..


    6. Tana Says:

      If you really red the Russinovich’s article you would find out that there rarely has been any need to change machine SID in the first place …
      But thanks for a nice detailed how-to-article !


    7. Joep Piscaer Says:

      Tana: there are lots of reasons to change the SID. Joining an AD is one I’ve had loads of trouble with if SID’s were identical.


    8. Øystein S. Says:

      Hi Joep,
      If you take a look at the comments to the referred article ppl have written a lot of interesting things.
      Including the difference in a machine SID and a domain SID.

      Also other aspects left out by the author, are discussed. As example WSUS, 3rd. party software, etc. still can cause problems.

      So as others already pointed out, the recommendation to NOT change the SID is not a good recommendation for everyone.

      In other words, you should keep changing the SIDs the way you normally do, only that NEWSID will not be around for vista and win 7. :-(

      (Seams like other features of NEWSID has been left out as useful, like changing and randomizing computer names, etc.)


      Ø.S.


    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>