Hyper-V 2012 R2: Pros and Cons of Generation 1 vs. Generation 2 VMs

Sunday Aug 11th 2013 by Nirmal Sharma
Share:

With Hyper-V in Windows Server 2012 R2 introducing support for two generations of virtual machines, we look at when and why you might want to select one VM generation over the other.

Microsoft recently announced Windows Server 2012 R2 during TechED 2013, with general availability expected by the end of the year. With Windows Server 2012 R2, a number of new features and improvements over existing ones have been introduced for Hyper-V running on the 2012 R2 release.

Windows Server 2012 R2 TutorialsIn earlier versions of Hyper-V, it was not possible to boot a Virtual Machine from a SCSI Virtual Hard Drive. It was also not possible to copy files from a Hyper-V Host to virtual machines without having a network connection in the virtual machine.

In fact, the Hyper-V BIOS was not aware of SCSI Controllers unless you installed the Integration Services component. In Virtual Machines running on Windows Server 2012 and earlier, the Hyper-V BIOS only supported legacy drives such as IDE Controller and Legacy Network Adaptors, which allowed a virtual machine to boot only from a Legacy IDE Controller.

Starting with Windows Server 2012 R2, there are two types of Hyper-V Boot architectures available: Hyper-V BIOS and Hyper-V Unified Extensible Firmware Interface (UEFI) BIOS. Hyper-V running on Windows Server 2012 R2 supports two types of Generation Virtual Machines now: Generation 1 and Generation 2.

A virtual machine created with Generation 1 supports legacy drivers and uses Hyper-V BIOS-based architecture. Hyper-V BIOS-based virtual machines can only initialize IDE Controller for Operating System to initialize a file system, which is shown in the below image:

Windows Server 2012 R2 Gen 1 VM

On the other hand, a virtual machine created with Generation 2 supports UEFI-based architecture, in which a subset of Integration Service components has been included to allow SCSI Controller to initialize before the Operating System starts loading. This is shown in the below image:

Windows Server 2012 R2 Gen 2 VM

What you see in the above screenshot is that the Generation 2 Virtual Machine no longer loads the legacy drivers (IDE and Legacy Network Adaptors). A majority of the legacy drivers have been removed from a virtual machine that has been created using Generation 2, but a subset of Integration Services components has been included to initialize at boot and before control is returned to the Operating System. This includes initializing and loading SCSI Controller driver before the Operating System starts loading.

Benefits of Generation 2 Architecture

A Generation 2 virtual machine provides the following functionality over a Generation 1 virtual machine:

  • Boot from a SCSI Virtual Hard Drive

    In earlier versions of Hyper-V, it was not possible to boot from a SCSI Virtual Hard Drive. With support to boot from a SCSI Virtual Hard Drive in Windows Server 2012 R2, it is not only possible to boot from a SCSI Virtual Hard Drive, you can also relocate the paging file to a SCSI Virtual Hard Drive.

    The ability to relocate the paging file to a SCSI Virtual Hard Drive helps in improving the overall performance for applications that frequently require paging operations.

  • PXE Boot Option

    In earlier versions of Virtual Machine, if you wanted to install an Operating System using network boot, you were required to install the Legacy Network Adaptor after installing the Operating System. With a Generation 2 Virtual Machine, it is now possible to install a Guest Operating System by connecting to a Remote Installation Service using the PXE Boot option.

  • Secure Boot

    Secure Boot, which is enabled by default for Generation 2 Virtual Machines, is a feature that helps prevent unauthorized firmware or UEFI drivers from running at boot time. This option can be modified after the virtual machine has been created.

  • Faster Boot Time and Faster Installation of Guest Operating System

    The boot time with Generation 2 Virtual Machine is up to 20% faster now and also installing a Guest Operating System in Virtual Machine using Generation 2 does not take as much time. In fact, the installation of a Guest Operating System under Generation 2 is 50% faster!

  • Native VMBUS Support at Boot

    A Generation 2 Virtual Machine provides support for VMBUS drivers at the boot. In earlier versions of virtual machines, or virtual machines that use Generation 1, VMs can only load Legacy IDE drivers for initializing file systems. The SCSI controller was available only after Integration Services had been installed in the virtual machine.

    In Generation 2, the Operating System is provided with the Synthetic drivers, which enable Operating System to use SCSI drivers at the boot. A virtual machine created with Generation 1 will always use Device Emulation unless Integration Service components have been installed.

    Since virtual machines using Generation 2 can boot from a SCSI Driver, the emulation is no longer required. These VMs can use VSP/VSC and VMBUS design effectively to communicate with the parent partition.

  • Fewer Devices

    There are fewer devices running in a Generation 2 Virtual machine compared to a Generation 1 Virtual Machine. This is because support for all emulated drivers such as IDE and Legacy Network adaptors have been removed and replaced with VMBUS drivers.

Requirements for Generation 2 Virtual Machines

Before you can have Generation 2 Virtual Machines, the guest operating system must be running one of the following operating system versions:

  • Windows Server 2012
  • Windows Server 2012 R2 Preview
  • 64-bit versions of Windows 8
  • 64-bit versions of Windows 8.1 Preview

How to Create Generation 2 Virtual Machines

The functionality for adding Generation 2 Virtual Machine has been implemented in Windows Server 2012 R2's "New Virtual Machine" wizard. You're presented with an option to select the Generation during the wizard as shown in the below screenshot:


Windows Server 2012 R2 VM Wizard

Note: Once the virtual machine has been created it is impossible to change the Generation.

You can also run Generation 1 and Generation 2 virtual machines side by side. Any guest operating system that does not support Generation 2 must be installed using the Generation 1 option.

When you create a Generation 2 Virtual Machine, an SCSI controller is added and base VHD is assigned to the Location 0 of the SCSI Controller. As you can see in the below screenshot for a virtual machine created using Generation 2, the base VHD (VM2.VHDX) is assigned to EFI SCSI Device.

Windows Server 2012 R2 VM Settings

You'll also notice there are less configuration options in a Generation 2 Virtual Machine as compared to a Generation 1 Virtual Machine. There are no options to add/configure IDE Controllers.


Nirmal Sharma is a MCSEx3, MCITP and Microsoft MVP in Directory Services. He has specialized in Microsoft Technologies since 1994 and has followed the progression of Microsoft Operating System and software. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles on various sites and contributing to Solution IDs for www.Dynamic-SpotAction.com. Nirmal can be reached at nirmal_sharma@mvps.org.

Follow ServerWatch on Twitter and on Facebook

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved