This topic describes how to create a virtual machine from a virtual machine template.

Considerations

  • You cannot change the system disk or startup disk configuration.

  • Templates are database objects that are displayed in Library view by selecting the Library Servers node in the navigation pane. Templates are not displayed when a library server or library share is selected.

Requirements

  • The virtual hard disk must have a supported operating system installed. For more information, see Supported Operating Systems for Virtual Machines

  • The Administrator password on the virtual hard disk should be blank as part of the Sysprep process. However, the Administrator password for the guest operating system profile does not have to be blank.

  • For customized templates, the operating system on the virtual hard disk must have been prepared by removing computer identity information. With Windows operating systems, for example, you can prepare the virtual hard disk with the Sysprep tool.

    Note
    Optionally, you can use a non-customized template without an operating system profile.

Procedure

To create a virtual machine from a template:

  1. On the Actions pane in the Virtual Machine Manager Administrator Console, click New virtual machine.

  2. Complete the New Virtual Machine Wizard.

Wizard Page Action

Virtual Machine Identity

Configure the following options:

  • Virtual machine name (required). Type a unique name for the virtual machine.

  • Owner (required). The owner must have a domain account in Active Directory.

  • Description (optional). Type a description for the new virtual machine.

Configure Hardware

To configure additional hardware for the virtual machine, use the following procedures:

  • Startup Order—Select the order of devices to start the operating system.

  • CPU Requirements—Specify processor requirements for the virtual machine.

  • Memory—Specify the amount of memory to allocate to the virtual machine

  • Floppy Drive—Configure the virtual floppy drive to read a physical floppy disk on the host or to read a virtual floppy disk file stored in the library.

  • DVD or CD Drive—Add a virtual DVD or CD drive to an IDE bus.

  • Virtual Hard Disk—Add a virtual hard disk to an IDE device or a SCSI adapter.

  • Network Adapters—Configure one or more virtual network adapters for a virtual machine.

  • Priority and Availability—Configure the virtual machine's priority for CPU resources on the host. Configure the virtual machine to be highly available.

Guest Operating System

(for customizable templates only)

Configure identity information, administrative credentials, and user access to computers based on the template.

  • General Settings: Enter the following settings:

    • Identity Information--Specify a computer name. To generate a computer name randomly for virtual machines based on the template, enter an asterisk in the Computer name field.

    • Admin Password: Specify the local administrator password for the virtual machine. If virtual machines created with this template will not be in a domain, users must use this password to gain access to the local computer.

      Note
      To prompt for a password when the user creates a virtual machine with the template, enter an asterisk (*) in the Admin Password field. If you leave the field blank, virtual machine creation fails.
    • Product key: If you want the template to provide a product key for virtual machines, enter a product key in the Product key field. To require users to provide their own product key when they create a virtual machine, leave the field blank.

    • Time Zone: Select the appropriate option from the Time Zone list box, or accept the default time zone.

    • Operating System: Select the operating system that will run on the virtual machine. This selection does not install an operating system.

  • Networking: Configure settings to determine network access for virtual machines:

    • Domain/Workgroup: If you want virtual machines that are created from this template to be in a domain, click Domain. Then specify a user account that will be used to add the computer to the domain at first log on. If the virtual machines that are created from this template will not be in a domain, click Workgroup, and then enter the name of the workgroup.

  • Scripts: Use the options under Scripts to provide additional settings for Sysprep:

    • Answer File: You can attach a Sysprep file (for Windows XP, Windows Server 2000, or Windows Server 2003) or an Unattend.xml file (for Windows Vista or Windows Server 2008) to the guest operating system profile. The answer file script must be stored on a library share.

      To select an answer file, click Browse to open the Select sysprep.inf script dialog box, and then select the file.

      To add settings, in the Answer file field, specify the Sysprep or Unattend file to run. The settings in the answer file will be appended to those from the wizard.

    • [GUIRunOnce] Commands: If you want to specify one or more commands to run the first time a user logs on to a virtual machine, type a command that you want to add in the Command to add field, and then click Add. This action adds the command to the [GuiRunOnce] section of the Sysprep file.

      Note
      To enable environment variable expansion when you create a new virtual machine from a template, you must precede GuiRunOnce commands with cmd.exe /c.

Select Destination

When creating a VM from a template, you must choose the following option:

  • Place the virtual machine on a host.

Select Host

Select a host to deploy the virtual machine on.

All hosts that are available for placement are given a rating of 0-5 stars based on their suitability to host the virtual machine. The host ratings are based on the virtual machine's hardware and resource requirements and anticipated resource usage. They are also based on placement settings that you can customize for VMM or for individual virtual machine deployments. The ratings are recommendations. You can select any host that has the required disk space and memory available.

  1. To see the placement settings that were used to rate the hosts, and optionally change those settings, click Customize Ratings to open the Customize Ratings dialog box.

  2. To view additional information about a host rating, select the host in the list. The tabs in the details pane beneath the list provide the following information:

    • Details -- Displays the status of the host and lists the virtual machines that are currently deployed on it.

    • Ratings Explanation -- If a host receives a zero rating, this tab lists the conditions that caused the rating.

    • SAN Explanation -- If a SAN transfer cannot be used to move the virtual machine's files to the host, this tab lists the conditions that prevent a SAN transfer.

    If a host has network optimization enabled, a green arrow appears in the Network Optimization column. VMM 2008 R2 allows you to take advantage of network optimization capabilities that are available on Hyper-V hosts that are running Windows Server 2008 R2. For information about network optimization and the hardware that supports it, see the Windows Server 2008 R2 documentation. After a virtual machine is deployed, this feature is displayed only for virtual machines that are deployed on a host that is running Windows Server 2008 R2.

Select Path

Select the path to the folder that will store the configuration files for the virtual machine:

Note
If you want to store other virtual machines on this path, select the Add this path to the list of host default paths check box to add the path to the list of default paths during virtual machine creation.

Select Networks

Modify the networks and attach them to None or to any of the virtual networks that are found on the selected host.

Note
Networks area list each of the virtual network adapters that are currently attached to the virtual machine. Network adapters default to None if you selected None in the hardware configuration or to the best matching virtual network according to the network matching rules.

Additional Properties

Configure actions to take on a virtual machine when the virtualization service starts and stops. For more information, see How to Configure Automatic Start and Stop Actions for a Virtual Machine

Summary

Review the configuration settings. To change settings, click Previous. To begin creating the virtual machine, click Create.

Note
Use the View Script button to display the Windows PowerShell - Virtual Machine Manager cmdlets that will perform the operation. All administrative tasks in Virtual Machine Manager can be performed at the command line or scripted.

See Also


For the most up-to-date Help information, go to the Virtual Machine Manager 2008 Help Online. To find additional Virtual Machine Manager 2008 documentation, go to the Virtual Machine Manager 2008 TechCenter Library.