Virtual Server 2005 R2 and hardware virtualization

As announced last Friday the Virtual Server 2005 R2 SP1 Beta 1 is now available for people to test. One question I have heard asked a lot is: What does hardware virtualization support do for Virtual Server?

Before I answer this question I would like to give some background. 

Prior to hardware virtualization support the x86 (and x64) processor architectures have not supported native virtualization. This has made writing software like Virtual Server / Virtual PC quite difficult.  The approach we have used to deal with this has been to try and virtualize as much of the processor as we can, and then to handle the rest with emulation. Usually this means that we have been able to run any user mode code in the virtual machine directly on the processor (virtualized) but that we have to emulate kernel mode code in the virtual machine.

Now - in order to provide improved performance, our Virtual Machine Additions will (on Windows virtual machines) make appropriate changes to the guest operating system such that we can run the virtual machines kernel mode code directly on the processor too (please note that there are some major simplifications in the above statements).

Hardware virtualization support allows us to run all of the virtual machine code directly on the processor in virtualized mode (with a few edge case exceptions). So getting back to the original question - what does this all mean for Virtual Server?

Well the first interesting point to make is that it does not make much difference for people running Windows virtual machines with the Virtual Machine Additions installed. As I mentioned we had already managed to get these virtual machines running almost entirely virtualized (from a processor perspective). 

So what does get better? Well - first thing to know is that since you can only load the Virtual Machine Additions after you have installed an operating system - so hardware virtualization helps greatly with the speed of operating system installation. For example - on my Intel test hardware I have been able to install Windows Server 2003 in a virtual machine in approximately 18 minutes (not bad - eh?). The second thing is that the performance of non-Windows operating systems is greatly boosted - as they now get to run directly on the processor too.

A final note - the hardware virtualization support being provided by Intel and AMD at the moment is for the processor only. We are still using the same emulated devices - obviously this is the next big area for the industry to focus on in order to increase performance of commodity virtual machines.

Cheers,
Ben