Executive Summary:
Microsoft System Center Virtual Machine Manager (SCVMM) 2008's virtual machine (VM) template feature lets you quickly and consistently provision virtual machines (VMs).
|
Microsoft System Center Virtual Machine Manager (SCVMM) 2008 provides welcome updates to the original product. I gave an overview of SCVMM 2008 in "Let SCVMM 2008 Manage It All"; in this article I show you how to install the product and bring a Hyper-V host under its control. After I show you how to create a managed host, I explain how to clone an existing virtual machine (VM) and create hardware and OS profiles. Finally, I show you how to use these profiles and an existing VM to create a template that you can use to quickly generate a new VM to your specifications. (For information about SCVMM integration with VMware's ESX Server, see the sidebar "SCVMM and ESX Server Integration."
Installing SCVMM
You can download a 180-day evaluation version of SCVMM 2008 from the Microsoft TechNet website. Although you can install SCVMM in complex configurations that require multiple servers (as I discuss in "Let SCVMM 2008 Manage It All," for the purposes of this article we'll run all of the components (server, console, library, and Microsoft SQL Server database) on one server.
SCVMM 2008 has the following software requirements for successful installation:
- The Server service must run on Windows Server 2008 x64 (although you can run SCVMM itself on a VM).
- Both the Server service and the administrator console require Windows PowerShell, which is included in Server 2008.
- SCVMM requires Windows Remote Management (WinRM), which is included in Server 2008.
- You must configure Microsoft Internet Information Services (IIS) 7.0 (which Server 2008 includes) to run the IIS 6.0 Metabase Compatibility, IIS 6.0 Windows Management Instrumentation (WMI) Compatibility, Static Content, Default Document, Directory Browsing, HTTP Errors, ASP.NET, .NET Extensibility, ISAPI Extensions, ISAPI Filters, and Request Filtering features.
- SCVMM requires SQL Server 2008, SQL Server 2005, or SQL Server 2005 Express Edition (which is included in SCVMM).
Most server-side components are included with either SCVMM or Server 2008 and are automatically configured when you install SCVMM. For more detailed information about the software and hardware requirements necessary to install SCVMM, go to the Microsoft System Center Virtual Machine Manager website.
Adding a Host to Manage
For the purposes of this article, I installed SCVMM on a Hyper-V host computer named THINKPADT61P, as Figure 1 shows, with SCVMM managing the host. Once the console is up and running, we need to add another host to manage. Selecting the Hosts view in the left-hand pane displays an Add host task in the Actions pane. Selecting the Add host task starts the Add Hosts wizard, which lets you easily find a host either by directly entering the host name or by using the wizard to search in Active Directory. For this article, I've already added the Hyper-V host HANSHI to be managed by SCVMM. Both hosts have their own Virtual Machine Manager (VMM) libraries, kept in sync through DFS Replication (DFSR). (You can install DFSR as a File Service role feature in Server 2008; for information about using DFSR, see "Get in Sync with DFSR."
Cloning the Template Source Virtual Machine
To create a VM template, you must first have a deployed VM to use as its source. For this article, I used a 64-bit Windows Server 2003 VM named W2K3R2x64. Because creating the template will destroy the VM, we must create a clone of the VM to use for the template. To create a clone, first make sure the VM is in either a stopped or saved state. Then, click the VM to highlight it, and select Clone from either the context menu or the Actions pane. The wizard will ask for the clone's name, hardware and network configuration, destination host, path on the host, and startup and shutdown properties. The wizard will also ask whether you want the cloned VM to reside as a deployed VM on a host or to be stored in the VMM library. If you store the cloned VM in a library, it is inactive and offline. To make the VM active, simply select the Deploy action. For this article, I left the original name, and I stored the cloned VM in HANSHI's library. Because the original VM will be destroyed to create the template, no duplicate names will exist.
Creating a Hardware Profile
The next step in building your VM library is to create a hardware profile. A hardware profile specifies the hardware configuration to be applied to a new VM created by SCVMM 2008. As Figure 2 shows, you can specify the number of processors and one of 25 different virtualized processor configurations, the amount of memory, the network to use, IDE/SCSI configuration, and more. By default, a hardware profile includes a built-in IDE drive (although you can't modify this drive until you create a VM). You can add and configure as many as four virtual SCSI adapters when you create a VM.