How to Create and Deploy a Virtual Machine from a Template
Updated: January 15, 2013
Applies To: System Center 2012 - Virtual Machine Manager, System Center 2012 SP1 - Virtual Machine Manager
Use the following procedure to create a virtual machine from a virtual machine template in Virtual Machine Manager (VMM) 2012. You can use a virtual machine template to create new stand-alone virtual machines or to create tiers in a service template. For more information about service templates, see Creating Service Templates in VMM.
Note the following:
-
Server roles and features, application installation, and SQL Server settings apply only when a virtual machine template is used for service deployments. For stand-alone virtual machine creation, these settings are not used and are not visible when you use a template with these settings to create a virtual machine.
-
To configure a virtual machine to use static IP addresses from an IP address pool that is managed by VMM, you must use a virtual machine template as the source.
-
To complete this procedure, you must be a member of the Administrator, the Delegated Administrator, or the self-service user role.
-
For a self-service user to deploy a virtual machine from a template, the following is required:
-
The self-service user role must have the Deploy or Deploy (From template only) actions in their user role scope.
-
The template must be available to the self-service user role as an assigned resource, or the self-service user role must be granted access in the template properties.
-
The self-service user role must have the Deploy or Deploy (From template only) actions in their user role scope.
-
If you are running System Center 2012 Service Pack 1 (SP1) and you are an Administrator or Delegated Administrator, you can use VMM to configure availability settings for the virtual machine. For more information, see Configuring Availability Options for Virtual Machines in System Center 2012 SP1 Overview.
Creating a Virtual Machine
To create a virtual machine from a template
-
Open the VMs and Services workspace.
-
On the Home tab, in the Create group, click the Create Virtual Machine drop-down arrow, and then click Create Virtual Machine.
The Create Virtual Machine Wizard opens.
-
On the Select Source page, make sure that Use an existing virtual machine, VM template, or virtual hard disk is selected, and then click Browse.
-
In the Select Virtual Machine Source dialog box, click the appropriate virtual machine template, and then click OK.
Note If the template contains Windows Server roles and features, application deployment, or SQL Server deployment settings, you will receive a message that these settings will be ignored for stand-alone virtual machine deployment. Click OK to continue. -
On the Select Source page, click Next.
-
On the Specify Virtual Machine Identity page, enter the virtual machine name and optional description, and then click Next.
-
On the Configure Hardware page, either select the profile you want to use from the Hardware profile list, or configure the hardware settings manually. After you have configured the hardware settings, click Next. Note the following:
-
In Capability, you must select a cloud capability profile that is supported by the private cloud.
-
In Network Adapters, if you configure a network adapter to use static IP addresses, you must also set the MAC address to static.
Warning In System Center 2012 (without Service Pack 1), the Enable spoofing of MAC addresses check box is erroneous and does not actually change the setting. However, this setting is required to deploy a service to a Windows Server 2008 R2 Hyper-V host (with or without Service Pack 1) that has Network Load Balancing enabled. Enable MAC spoofing using the VMM command prompt, either after you create the template or in the hardware profile for the template. To update a virtual machine template, type the following at the command line, where VMTemplate01 represents the name of the virtual machine template: For more information, see How to Configure NLB for a Service Tier.PS C:\> $VMTemplate = Get-SCVMTemplate -Name "VMTemplate01" PS C:\> $VirtNetworkAdapter = Get-SCVirtualNetworkAdapter -VMTemplate $VMTemplate PS C:\> Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $VirtNetworkAdapter -EnableMACAddressSpoofing $True
-
In Network Adapters, for a virtual machine that will use a virtual hard disk in the .vmdk (VMware) format, be sure to include a legacy network adapter in the template. To add a legacy network adapter, at the top, in the New bar, click Network Adapter and then (in the dropdown box) click Legacy network adapter. If you do not include a legacy network adapter when you use the .vmdk format, when you deploy the virtual machine, it might not be able to start in a domain, although it will be able to start in a workgroup.
-
On the Configure Operating System page, configure the guest operating system settings. If you have an existing guest operating system profile that you want to use, in the Guest OS profile list, click the guest operating system profile that you want to use. After you configure the guest operating system settings, click Next.
-
In Capability, you must select a cloud capability profile that is supported by the private cloud.
-
On the Select Destination page, specify how the virtual machine should be deployed:
-
Select Deploy the virtual machine to a private cloud to place the virtual machine in an existing private cloud. Then follow the instructions in Deploying the Virtual Machine in a Cloud.
-
Select Place the virtual machine on a host to place the virtual machine on an existing virtual machine host. Then follow the instructions in Deploying the Virtual Machine on a Host.
-
Select Store the virtual machine in the library to store the virtual machine. Then follow the instructions in Storing the Virtual Machine in the Library.
-
Select Deploy the virtual machine to a private cloud to place the virtual machine in an existing private cloud. Then follow the instructions in Deploying the Virtual Machine in a Cloud.
Deploying the Virtual Machine in a Cloud
-
On the Select Cloud page, select the cloud on which you want to place the virtual machine. If you are connected as an Administrator, you can select the host on which the virtual machine should be deployed in the private cloud. The cloud suggestions are based on a 0-5 star rating. For more information, see Understanding Virtual Machine Placement and Ratings in VMM. Verify the settings and modify if required:
- Expected Utilization—For a virtual machine created from a blank hard disk, the expected utilization is based on standard defaults. For a virtual machine created from an existing virtual machine, the default settings are based on past performance of the existing machine. VMM updates host suggestions and ratings in response to modifications made to the expected virtual machine utilization.
- Make this VM highly available—With this option selected, only hosts located in a cluster are available for selection.
- Details—Indicates the status of the host, the operating system, and the type and status of virtualization software.
- Rating Explanation—Provides an explanation if a host received a zero rating.
- SAN Explanation—Lists any factors that make a SAN transfer unavailable. VMM does not recognize a virtual machine stored on a SAN as available for deployment using SAN transfer if the virtual machine was stored directly in library when it was created, or was added to the library during a library refresh. To avoid this issue, deploy the virtual machine to a host using a LAN transfer, and then store the virtual machine in the same VMM library, library share, and logical unit number (LUN).
- Expected Utilization—For a virtual machine created from a blank hard disk, the expected utilization is based on standard defaults. For a virtual machine created from an existing virtual machine, the default settings are based on past performance of the existing machine. VMM updates host suggestions and ratings in response to modifications made to the expected virtual machine utilization.
-
On the Configure Settings page, confirm or change the computer name, and then click Next.
-
On the Add Properties page, configure the action to take when the host starts or stops. If you are a VMM administrator, to prevent the virtual machine from being migrated by PRO or dynamic optimization, select the Exclude virtual machine from optimization actions check box. Then click Next.
-
On the Summary page, confirm the settings and then click Create.
To confirm that the virtual machine was created, in the VMs and Services workspace, in the VMs and Services pane, expand Clouds, and then click the private cloud where you deployed the virtual machine. On the Home tab, in the Show group, click VMs. The virtual machine appears in the VMs pane.
Deploying the Virtual Machine on a Host
-
On the Select Host page, view the ratings, click the host on which you want to deploy the virtual machine, and then click Next. The host suggestions are based on a 0-5 star rating. For more information, see Understanding Virtual Machine Placement and Ratings in VMM. Note the following settings:
-
For a virtual machine created from a blank hard disk, the expected utilization is based on standard defaults. For a virtual machine created from an existing virtual machine, the default settings are based on past performance of the existing machine. VMM updates host suggestions and ratings in response to modifications made to the expected virtual machine utilization.
-
Make this VM highly available—With this option selected, only hosts in a cluster available for selection.
-
Details—Indicates the status of the host, the operating system, and the type and status of virtualization software.
-
Rating Explanation—Provides an explanation if a host received a zero rating.
-
SAN Explanation—Lists any factors that make a SAN transfer unavailable. VMM does not recognize a virtual machine stored on a SAN as available for deployment using SAN transfer if the virtual machine was stored directly in library when it was created, or was added to the library during a library refresh. To avoid this issue, deploy the virtual machine to a host using a LAN transfer, and then store the virtual machine in the same VMM library, library share, and logical unit number (LUN).
-
For a virtual machine created from a blank hard disk, the expected utilization is based on standard defaults. For a virtual machine created from an existing virtual machine, the default settings are based on past performance of the existing machine. VMM updates host suggestions and ratings in response to modifications made to the expected virtual machine utilization.
-
On the Configure Settings page, review the settings for the virtual machine:
-
In Locations, either accept the default virtual machine path on the host for storing the virtual machine files, or click Browse to specify a different location. Optionally select the Add this path to the list of default virtual machine paths on the host check box.
-
In Operating System Settings, click Identity Information. You can either accept or change the computer name.
-
In Networking, you can click a network adapter to view the configured network settings.
-
In Machine Resources, click Virtual Hard Disk, review and optionally modify the settings. Then click Next.
Tip To prevent placement from choosing a different value for these settings, click the pin icon next to the setting. Note that self-service users do not see this option. -
In Locations, either accept the default virtual machine path on the host for storing the virtual machine files, or click Browse to specify a different location. Optionally select the Add this path to the list of default virtual machine paths on the host check box.
-
On the Add Properties page, configure the action to take when the host starts or stops. To prevent the virtual machine from being migrated by PRO or dynamic optimization, select the Exclude virtual machine from optimization actions check box. When you are finished with this step, click Next.
-
On the Summary page, confirm the settings and then click Create.
Storing the Virtual Machine in the Library
-
On the Select Library Server page, click the library server that you want to use, and then click Next.
-
On the Select Path page, specify the library share location to store the virtual machine. Click Browse to select a library share and optional folder location, click OK, and then click Next.
-
On the Summary page, confirm the settings and then click Create.
To confirm that the virtual machine was created, in the Library workspace, in the Library pane, expand Library Servers, expand the library server where you stored the virtual machine, and then click Stored Virtual Machines and Services. The stored virtual machine appears in the Physical Library Objects pane.
See Also
-----
For additional resources, see Information and Support for System Center 2012.
Tip: Use this query to find online documentation in the TechNet Library for System Center 2012. For instructions and examples, see Search the System Center 2012 Documentation Library.
-----
