Friday, May 27, 2011

Updating of SCVMM Template in Offline mode

The new Virtual Machine Servicing Tool (VMST) 3.0 helps to service and patch Hyper-V VMs in offline mode. The new v3.0 introduces the following new features:
  1. Offline virtual machines in a SCVMM library.
  2. Stopped and saved state virtual machines on a host.
  3. Updating of Virtual machine templates.
  4. Offline virtual hard disks in a SCVMM library by injecting update packages.
The new feature that I’m waiting for is the ‘offline’ patching of VM templates. In SCVMM, template is an efficient way to deploy pre-configured VMs quickly over and over again. However, the newly created VMs out of a particular template will be ‘out-of-patch’ soon. Imagine you can’t enjoy the new features offered in Windows 2008 R2 SP1 immediately, as the VM template was created quite sometime ago.

For downloading of this tool, click here. I won’t go into details, as a “Getting Started” guide is included in the toolkit. Hence, I would just summarize the procedure of servicing VM template (the feature that I’m most interested on):
  1. Prepare the infrastructure for servicing, including AD, DHCP, SCVMM, and updating services (WSUS/SCCM). I believe most of us should already have this infrastructure in place if you’re using Hyper-V and SCVMM seriously.
  2. The Virtual Machine Servicing Tool must be installed on the same server as the VMM Administrator Console (the Administrator Console provides Windows PowerShell support). The VMM server and library components can reside on the same server or on one or more additional servers.
  3. From the target template that you want to update offline, use SCVMM to create a Gold VM out of it. VMST will deploy the Gold VM on a maintenance Hyper-V host with WSUS/SCVMM patches and replace it with an updated VM template eventually. The Gold VM must be stored in the same VMM library.
  4. Perform initial setup on VMST to reference the VMM server, Maintenance Host, update server (WSUS and/or SCCM server).
  5. Create a Template Group. Associate the Gold VM to this template.
  6. Create scheduled servicing jobs. Start the job.
During the servicing job, the following tasks will occur:
  1. Mounts the gold virtual machine associated with the virtual machine template on the maintenance host.
  2. Starts the gold virtual machine on the maintenance host, and then invokes either Configuration Manager or WSUS to update it.
  3. Clones the updated gold virtual machine, creates a template from the cloned virtual machine, and then uses Sysprep to generalize the cloned gold virtual machine to remove hardware ID information.
  4. Shuts down the updated gold virtual machine, and returns it to the offline VMM Library.
  5. Associates the .vhd file of the cloned virtual machine template with the original template, and then deletes the cloned virtual machine template.

2 comments:

  1. I can't get VMST to apply 2008 R2 SP1 to the template. It works fine for other updates, just not the SP.

    Any ideas?

    ReplyDelete
  2. When I try to create the group I get to the "Create Template - Virtual Machine Association" step and get offered no Virtual Machines for the Template. At this point I get 3 Event log errors suggesting that the VM parameter is Null or empty in a call somewhere inside. I have tried with the Gold VM deployed and stored in the VMM Library with the Template - Any ideas what I'm doing wrong?

    ReplyDelete