Monday, November 11, 2013

How to create a GEN2 VM with SCVMM 2012 R2

Hopefully, you are a completely aware of the support of GEN2 VMs in Hyper-V in Windows Server 2012 R2.
The virtual machine generation determines the virtual hardware and functionality that is presented to the virtual machine.

Generation 1 VMs is the legacy VMs that we have been using over the last years, that provides the same virtual hardware to the virtual machine as in previous versions of Hyper-V.

Generation 2 VMs  provides a lot of new functionality on a virtual machine, like:

-          Boot from a SCSI virtual hard disk
A well-known topic about the architecture of Hyper-V is that the boot partition always had to be associated with an IDE controller in the virtual hardware profile. This was because it would bypass the integration service requirements, so that you could boot ‘any’ guest OS on Hyper-V. The performance was identical as to SCSI controller associated disk when integration services was present, but it was simply a bypass. This gave us some challenges regarding new features we got in 2008 R2, like hot-add/remove of virtual hard disk that could only be performed on VHD’s associated with the SCSI controller. In other words, only data-partitions could be added/removed on the fly. Since a GEN2 VM now can boot from a SCSI-controller, we can also add/remove and resize these disks associated, even if it’s the boot partition. Please note that VHDX is a requirement in order to use GEN2 VMs.

-          Secure Boot (this one is enabled by default)
Secure boot is enabled by default for GEN2 VMs and is a feature that helps prevent unauthorized firmware, operating systems, or UEFI drivers from running at boot time

-          Boot from a SCSI virtual DVD
Instead of using an IDE virtual DVD, we can now use SCSI Virtual DVD

-          PXE boot by using a standard network adapter (this is for real!)
If you wanted to boot a VM and to perform a remote installation of the guest operating system using PXE boot, you had to use a legacy virtual network adapter in the virtual hardware profile – in order to bypass the integration services (since they were not present at boot time). GEN2 VMs support PXE boot by using a standard virtual network adapter (aka synthetic device) so there is no need to install a legacy network adapter, which has been removed from GEN2 VMs.

-          UEFI firmware support
The Generation 2 VM has a much more simplified virtual hardware model and supports Unified Extensible Firmware interface (UEFI) firmware instead of BIOS-based firmware. This means that most of the legacy devices are removed from GEN2 VMs.

These are the guest operating systems that are supported as GEN 2 VMs:

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

By reading this, I can assume that you can see the benefits of using GEN2 VMs.

In addition, SCVMM 2012 R2 support GEN2 VMs and we can create, deploy (newly VMs or/and based on templates) through powershell and the GUI.

Please note: Services in VMM in System Center 2012 R2 do not support generation 2 virtual machines. When you create a service template in VMM, if you have created virtual machine templates (VM templates) that specify generation 2 virtual machines, you cannot add those templates to the service template. You can only add virtual machine templates that specify generation 1 virtual machines. Also, within a service template, in the virtual machine (tier) properties sheet, properties for a generation 1 virtual machine appear, but properties that are unique to generation 2 virtual machines do not appear.

Since SCVMM is fully aware of your datacenter infrastructure, it will leverage intelligent placement during VM deployment. This means that SCVMM will identify which hosts that support GEN2 VMs prior to deployment (give you a star rating) and help you to avoid faulty placement of GEN2 VMs.

How to create a GEN2 VM with SCVMM 2012 R2

1.       Logon to your SCVMM server and navigate to ‘VMs and Services’
2.       Click ‘Create Virtual Machine -- > Create Virtual Machine’ from the ribbon menu

3.       Select ‘Create a new Virtual Machine with a blank hard disk’ and click next. This is important, as you can’t use any template with GEN1 as your source

4.       On the ‘Specify virtual machine identity’ page, assign the VM a name and also specify the generation of the virtual machine. Click on the drop down list and select Generation 2

5.       On the ‘Configure hardware for the virtual machine…’ page, add an ISO image to the DVD drive, and eventually adjust any of the other hw settings to meet your requirements. Please note the absence of the legacy hardware that we had in generation 1 VMs

6.       On the ‘select destination’ page, please specify the cloud or the host group where the VM should be deployed

7.       Intelligent placement will work out its magic and detect the best suited host to run the virtual machine. Click next 3 times and finish to start the deployment

You should now have successfully deployed a GEN2 VM with SCVMM 2012 R2

The next logical steps would be as follows:

1.       Install and customize the guest operating system within the VM
2.       Shut down the VM
3.       Remove the ISO attached to the VM

4.       Create a VM template with SCVMM 2012 R2 and place it in your library


Anonymous said...


I have most of my infrastructure on generation 2 VMs. When I try to migrate the virtual machine to a 2012R2 host, it tells me "For generation 1 virtual machines, the virtualization platform on host .... requires boot and system volumes to use an IDE bus. These volumes cannot be on a disk attached to a SCSI adapter. The disk at the location (SCSI, 0, 0) is on a SCSI adapter.
" Not sure what is up here, they are generation 2 machines and VMM has been upgraded to R2 and all hosts are R2 also?!?!?!?!

Kristian Nese said...

Have you created Gen2 VMs outside of VMM? If you look at the hw profile of the Gen2 VM in VMM, do you clearly see that it is a Gen2 VM?

VKP MCSE Chennai said...

Thanks for the wonderful post! what is the latest version of SCVMM, can i get the evaluation edition?

Kristian Nese said...

The latest version is VMM 2012 R2 - with Update Rollup 5.

You can get the evaluation software by following this link: