Creating Virtual Machine Templates in VMM
A virtual machine template is a library resource consisting of a guest operating system profile, a hardware profile, and one or more virtual hard disks (VHDs), which can be used to create a new virtual machine. Self-service users must use assigned templates to create their virtual machines.
Warning
Creating a template can destroy the virtual machine that is used as the template's source. This is because Sysprep strips the virtual machine of its computer identity. If you want to continue to use the source virtual machine after creating the template, you must clone the virtual machine before you start. For instructions, see "How to Clone a Virtual Machine" (https://go.microsoft.com/fwlink/?LinkId=102844).
This topic tells how to create a virtual machine template from an existing virtual hard disk and from a virtual machine.
Requirements for the Source Virtual Machine
To be converted to a template, the virtual machine must meet the following requirements:
- One of the following operating systems must be installed: Windows Server 2003 or Windows Server 2003 R2.
- The system partition must be the same as the Windows partition.
- 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.
- Virtual Machine Additions must be installed on the virtual hard disk that contains the operating system. For instructions, see "How to Install Virtual Machine Additions on a Virtual Machine in VMM" (https://go.microsoft.com/fwlink/?LinkId=103799).
- The virtual machine must be deployed on a host. This is required because the wizard runs Sysprep.exe on the running virtual machine, and Virtual Server must be present to run the virtual machine.
Creating a Template from a Virtual Hard Disk
This section describes how to create a template from an existing virtual hard disk.
Considerations
When you create a template from a virtual hard disk:
- Sysprep strips the virtual machine of its computer identity. If you want to continue to use the source virtual machine, you must clone the virtual machine before you create the template.
Procedure
The following procedure tells how to create a virtual machine template from an existing virtual hard disk.
- Prepare the source virtual hard disk, which has the operating system installed, for duplication:
- Run Sysprep on the .vhd file to remove computer identity information from the disk.
- Install Virtual Machine Additions on the .vhd file. For more information, see "How to Install Virtual Machine Additions on a Virtual Machine" (https://go.microsoft.com/fwlink/?LinkId=103799)
- Add the source .vhd file to the library. For more information, see the "How to Add Files to the Library" Help topic (https://go.microsoft.com/fwlink/?LinkId=98990)
- In Library view, in the Actions pane, click New Template.
- Complete the New Template Wizard.
Wizard Page | Action |
---|---|
Select Source |
|
Template Identity |
Enter a template name and description, and specify the owner of the template. The template owner must have an AD DS domain account. All VMM administrators will be able to use the template. Note If you were to use the template in virtual machine self-service, you would need to specify an owner. Only the template owner -- whether an individual self-service user or a group assigned to the self-service policy -- would be able to create, see, and manage virtual machines created with the template. |
Configure Hardware |
Customize the hardware settings as needed. The links below open procedures for key configurations. If virtual machines created with this template will be accessed over a network, you must configure a network adapter to connect to each virtual network. Note To be able to configure the template to add new virtual machines to a domain, later in this procedure, you must configure at least one network adapter. To configure network adapter
To configure additional hardware for the virtual machine, use the following procedures:
|
Guest Operating System |
Configure identity information, administrative credentials, and user access to computers based on the template.
|
Summary |
Review your settings. To change the settings, click Previous. To create the template, click Create. |
Creating a Template from a Virtual Machine
This section describes how to create a template from an existing virtual machine.
Considerations
To be converted to a template, the virtual machine must meet the following requirements:
- The virtual machine must be managed by Virtual Machine Manager.
- The virtual machine must have one of the following operating systems: Windows 2000 Server, Windows Server 2003, or Windows Server 2003 R2
- Virtual Machine Additions must be installed on the virtual hard disk that contains the operating system. For more information, see "How to Install Virtual Machine Additions on a Virtual Machine" (https://go.microsoft.com/fwlink/?LinkId=103799)
- The virtual machine must be deployed on a virtual machine host. This is required because the wizard runs Sysprep.exe on the running virtual machine, and Virtual Server must be present to run the virtual machine.
Procedure
The following procedure tells how to create a virtual machine template from an existing virtual hard disk and from a virtual machine.
- In Library view, in the Actions pane, click New Template.
- Complete the New Template Wizard.
Wizard Page | Action |
---|---|
Select Source |
|
Template Identity |
Enter a template name and description, and specify the owner of the template. The template owner must have an AD DS domain account. All VMM administrators will be able to use the template. Note If you were to use the template in virtual machine self-service, you would need to specify an owner. Only the template owner -- whether an individual self-service user or a group assigned to the self-service policy -- would be able to create, see, and manage virtual machines created with the template. |
Configure Hardware |
Customize the hardware settings as needed. The template inherits the hardware configuration of the source virtual machine. The links below open procedures for key configurations. If virtual machines created with this template will be accessed over a network, you must configure a network adapter to connect to each virtual network. Note To be able to configure the template to add new virtual machines to a domain, later in this procedure, you must configure at least one network adapter. To configure network adapter
To configure additional hardware for the virtual machine, use the following procedures:
|
Guest Operating System |
Configure identity information, administrative credentials, and user access to computers based on the template.
To automate mini-Setup, in the [GUIRunOnce] Commands field, enter the commands to run at first logon. |
Summary |
Review your settings. To change the settings, click Previous. To create the template, click Create. |