Understanding Generation 1 and Generation 2 Virtual Machines in VMM

 

Updated: May 13, 2016

Applies To: System Center 2012 R2 Virtual Machine Manager

In Virtual Machine Manager (VMM) as of System Center 2012 R2, you can create and manage two types of virtual machines, including the type introduced in Hyper-V in Windows Server 2012 R2, called “generation 2 virtual machines.” Before generation 2 virtual machines existed, virtual machines were all of one type, which are now referred to as “generation 1 virtual machines.” For more information, see Generation 2 Virtual Machine Overview.

A virtual machine must be either a generation 1 virtual machine or a generation 2 virtual machine. In VMM, you can use the wizards and property sheets to choose options for either a generation 1 virtual machine or a generation 2 virtual machine, but not both together.

Important

As of Update Rollup 6 for System Center 2012 R2, services in VMM support generation 2 virtual machines, as described in the following section. Before Update Rollup 6, they did not.

Before Update Rollup 6, you could not add VM templates specifying generation 2 to a service template or VM Role template—only generation 1 could be added. Also, within a service template, in the virtual machine (tier) properties sheet, only properties for a generation 1 virtual machine would appear.

For information about other features and changes in Update Rollup 6, see https://support.microsoft.com/kb/3050317/.

Using generation 2 virtual machines in VMM with Update Rollup 6 for System Center 2012 R2

With Update Rollup 6 for System Center 2012 R2, you can do the following in VMM:

  • You can add VM templates specifying either generation 1 or generation 2 to a service template. Within a service template, in the virtual machine (tier) properties sheet, the properties that match the generation of the virtual machine appear.

  • If you are using VMM with Windows Azure Pack, you can create VM Role templates specifying either generation 1 or generation 2. The capability is included in Update Rollup 6, but to enable it, you must take the following steps:

    1. Open the properties for the cloud where you want to deploy generation 2 virtual machines.

    2. Click the Custom Properties tab, click Manage Custom Properties, click Create, and type:

      SupportedVmGenerationForVmRole

      Click OK to return to Manage Custom Properties.

    3. Select the new property and then click Add.

    4. After the new property moves into the Assigned properties list, click OK.

    5. On the Custom Properties tab, SupportedVmGenerationForVmRole appears beside an empty box. In the box, type:

      2

    6. Click OK.

After taking these steps, if you deploy a new service using VM Roles with generation 2, it will be supported. You can also scale out that service with additional generation 2 virtual machines even if you change SupportedVmGenerationForVmRole to a value of 1.

For more information about VM Role templates, see Creating Virtual Machine Role Templates by Using VMM and Windows Azure Pack.

Host requirements for generation 2 virtual machines

Generation 2 virtual machines can only run on a host with a host operating system that supports them. Windows Server 2012 R2 is an operating system that supports generation 2 virtual machines, and VMM will avoid placing generation 2 virtual machines on hosts that are running earlier operating systems. For example, VMM will avoid placing a generation 2 virtual machine on a host running Windows Server 2012.

Customizing the startup order for a generation 2 virtual machine

Because of underlying differences between generation 1 and generation 2 virtual machines, the startup order (boot order) for different devices (such as a hard disk or CD) is not handled the same way in the two generations. To customize the startup order for a generation 2 virtual machine in System Center 2012 R2, you must use a Windows PowerShell command that specifies the first boot device, rather than an ordered list of boot devices. The following list outlines the differences in the methods for customizing the startup order.

  • Customizing the startup order for generation 1 virtual machines

    One way to customize the startup order for generation 1 virtual machines is by using the VMM console. To use the VMM console, in the wizards for adding a hardware profile, virtual machine, or virtual machine template, on the page where you configure hardware settings, under Advanced, in the Firmware section, you can modify the order of items in the Startup order list. Another way to customize the startup order is to use Windows PowerShell commands with the BootOrder parameter, which is described in more detail in TechNet topics for cmdlets such as Set-SCVirtualMachine, Set-SCVMTemplate, or Set-SCHardwareProfile.

  • Customizing the startup order for generation 2 virtual machines

    To customize the first boot device for generation 2 virtual machines, you must use Windows PowerShell commands with the FirstBootDevice parameter. By default, the first boot device is set to a virtual hard disk—either the virtual hard disk marked as Contains the operating system for the virtual machine, or the only virtual hard disk, if the virtual machine has only one.

    The FirstBootDevice parameter is described in more detail in TechNet topics for cmdlets, such as Set-SCVirtualMachine, Set-SCVMTemplate, or Set-SCHardwareProfile. For example, you could run the following command to configure an existing virtual machine template called Generation2template so that the first boot device is the first network adapter. This command is based on the assumption that the network adapter supports the Pre-Boot Execution Environment (PXE):

    Set-SCVMTemplate -Template "Generation2template" –FirstBootDevice "NIC,0"  
    

Creating a virtual machine or virtual machine template and specifying the generation

As of System Center 2012 R2, when you use a wizard to create a new virtual machine or virtual machine template, VMM responds to your selections as follows:

  • If you use a virtual hard disk in .vhd format (the older format) as the starting point for a virtual machine or virtual machine template, it automatically becomes generation 1, because generation 2 virtual machines support only the .vhdx format. In this situation, you do not see the Generation list box on the second page of the wizard, and you cannot select the generation.

  • If you use a virtual hard disk in .vhdx format (the newer format) as the starting point for the virtual machine or virtual machine template, when you reach the second page of the wizard (the Identity page), you have two choices for the virtual machine or virtual machine template: Generation 1 or Generation 2. By default, Generation 1 is selected.

    This guideline also applies if you create a virtual machine and choose Create the new virtual machine with a blank virtual hard disk. With this option, the blank disk uses the .vhdx format.

  • If you use an existing virtual machine or virtual machine template as the starting point for a new virtual machine or virtual machine template, the generation is determined by the existing virtual machine or virtual machine template.

  • If you create a hardware profile (to make it easier to consistently apply the same hardware settings to multiple virtual machines or virtual machine templates), on the first page of the New Hardware Profile Wizard, you must choose between Generation 1 or Generation 2. By default, Generation 1 is selected.

    When you later incorporate the hardware profile into a virtual machine or virtual machine template, in the respective wizard, the generation of the virtual machine or virtual machine template is determined on the first or second page (as described earlier in this list). Then, on the wizard page that contains the Hardware profile list box, the only hardware profiles that appear are those of the same generation as the virtual machine or virtual machine template that you are creating.

After the generation has been determined for a hardware profile, virtual machine, or virtual machine template, as you progress through a wizard, the capabilities that do not apply to that generation are either absent or they appear dimmed. For example, if you select Generation 1 on the Identity page, when you advance to the Configure Hardware page, under Bus Configuration, IDE Devices appears. IDE devices are found only in generation 1 virtual machines. In contrast, if you select Generation 2 on the Identity page, when you advance to the Configure Hardware page, under Bus Configuration, IDE Devices does not appear. Instead, for the SCSI Adapters that appear, attached devices are shown, which reflects the unique capability in generation 2 virtual machines to boot from a SCSI-attached virtual hard disk.

Similarly, with a Windows PowerShell command, if you try to combine the unique capabilities of both generations into one virtual machine or virtual machine template, the command does not succeed, and an error message is displayed. Also, if you try to modify an existing virtual machine or virtual machine template by adding options from the other generation, the command does not succeed, and an error message is displayed. For more information about the unique capabilities in generation 2 virtual machines, see Generation 2 Virtual Machine Overview.

See Also

Creating and Deploying Virtual Machines in VMM
How to Create a Virtual Machine Template
How to Create a Hardware Profile
Generation 2 Virtual Machine Overview