Generation 2 Virtual Machines in Hyper-V

Somewhat off-topic but this is something I’ve been toying with recently and I’ve found rather impressive so I thought I’d share. Windows 8.1/2012-R2 as we know has been out for a while and with it comes a brand-new Hyper-V which amongst many other things includes the ability to create a new type of VM called “generation 2” virtual machines.

image

You can only specify this when creating new VMs so anything migrated from Windows 2012/8 or before will be generation 1 without the chance to change this, but new VMs however can be “generation 2”.

What’s “Generation 2” Then?

Small disclaimer - I’m not a Hyper-V expert at all so I expect many others will be better placed to answer this than me.

Gen-2 Virtual Machines (VMs) are much more streamlined than typical VMs, with some extra enhancements on top. Think of “generation 1” VMs as having made the leap from physical-machine to virtual-machine by simulating every part of a physical PC in software to the point the guest OS and software would be none the wiser. Now in generation 2 we’ve taken the next logical step – remove legacy hardware components that don’t make any sense to have in a machine that's virtual, which just happens to be many components indeed. So if you compare the hardware in a generation 1/2 machine you’ll see gen-2 machines have much less “fluff” – no COM ports, no floppy-disks, no PCI/ISA buses or bridges; gen-2 machines have barely anything that exists in real physical computers but that’s completely useless or irrelevant for virtual computers. It’s Windows on a diet and that’s no bad thing at all.

The result of this hardware diet is a much more efficient “machine” and one of the side-effects is setting it up is much quicker. I recorded a test client setup to prove this – from starting setup to browsing the internet in less than 5 minutes (link: here).

Impressive speed in the new Generation-2 VMs

Gen2 VMs - Actual Benefits?

There's some extra functionality this allows; boot to network (without using a legacy NIC) and some other funky stuff too but really this is about turning Windows into a lean application partition that can setup from the ISO/DVD in minutes as opposed to hours. Actually memory usage and application performance is about the same but this is about stripping out the layers of fat from the guest OS for a cleaner complete stack – it’s about making Windows leaner than ever. It’s something Microsoft are in a unique position to be able to engineer given we own both virtualisation and guest-OS - it’s a deep level of ownership & integration, from physical server to virtualised application that nobody else is able to do as completely, and in my humble opinion this is beginning to show :)

Cheers,

Sam