When not to use Generation 2 virtual machines

Generation 2 virtual machines offer performance improvements but have limited support for legacy systems. Find out when you should and shouldn't use the new VM architecture.

If you are running Windows Server 2012 R2 Hyper-V, then one of the questions that you must consider is whether you should use Generation 2 virtual machines. Like so many things in IT, there is no clear and simple answer to this question. The virtual machine architecture that you should use really depends on your needs.

The guest operating system
One of the first considerations you must take into account is the guest operating system. Generation 2 virtual machines only support three guest operating systems:

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

Legacy media support

Generation 2 virtual machines are far more limited than first generation virtual machines when it comes to support for legacy storage devices. Generation 2 virtual machines do not use IDE controllers, which means that you cannot create IDE virtual hard disks.

Although the lack of IDE virtual hard disks probably won’t be a deal breaker for most organizations, a more significant limitation is the lack of support for physical DVD drives. A Generation 2 virtual machine can be configured with a virtual DVD drive, but that virtual DVD drive must connect to an ISO file rather than a physical disk. Those who want the convenience of a physical DVD drive are better off sticking to first generation virtual machines.

Performance comparison

One of the biggest reasons for using Generation 2 virtual machines is that they generally provide better performance than their first generation counterparts. There are a few different reasons for these performance gains.

The main reason why Generation 2 virtual machines tend to perform better than first generation VMs is that they don’t rely on device emulation. Generation 1 virtual machines could only boot from emulated IDE hardware. Generation 2 VMs boot from virtual SCSI hardware. While this might not sound like a significant difference, you have to consider what is going on behind the scenes.

The reason why Generation 1 VMs could not boot from virtual SCSI disks is because first generation virtual machines had to boot from emulated IDE hardware. The boot process was not the only thing tied to emulated hardware. Other hardware components such as the network adapter were also emulated. First generation VMs are only able to overcome the performance impact of hardware emulation by using the Integration Services.

Generation 2 virtual machines are different in that they natively use the VMBUS to communicate with the parent partition. This VMBUS (and some synthetic drivers) are what makes it possible to boot a Generation 2 VM from a virtual SCSI disk. Keep in mind that the VMBUS isn’t exclusive to virtual disks. It is also used by other components such as the virtual network adapter.

So how much of a performance improvement does a Generation 2 virtual machine provide? According to Microsoft, Generation 2 VMs boot about 20% faster than Generation 1 virtual machines. According to some estimates, an operating system can be installed on a Generation 2 VM in half the time that it takes to install on a comparable Generation 1 VM.


Security advantages

Security isn’t exactly one of the most compelling reasons for choosing one generation of virtual machine over another, but Generation 2 VMs do support Secure Boot. In fact, Secure Boot is enabled by default on Generation 2 VMs.

In case you are not familiar with Secure Boot, it is a technology that was first introduced in Windows 8 and Windows Server 2012 as a way of protecting the machine against malicious boot code. When a generation 2 VM boots, the hypervisor checks the digital signature for each component used in the boot process (including firmware drivers). If the signatures are valid, then the utility assumes that the software’s integrity has not been compromised and the system is allowed to boot.

So, should you be creating Generation 1 or Generation 2 virtual machines? It really depends on your needs. Generation 1 virtual machines should be used in the following situations:

  • You need a VM to access a physical DVD drive
  • The VM needs to run a version of Windows older than Windows 8 or Windows Server 2012
  • The VM needs to run a non-Windows operating system
  • The VM may eventually need to be hosted on a server running an older version of Hyper-V

If none of these conditions apply to the VM, then you may be better off creating Generation 2 VMs.

Dig Deeper on Virtual machine provisioning and configuration