Hyper-V Tips & Tricks

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

odditory

Moderator
Dec 23, 2010
383
64
28
Two things I highly recommend for anyone running Hyper-V or anyone thinking about installing it: 1) Differencing disks, 2) Dynamic Memory (new feature of Windows 2008 R2 Service Pack 1)

Differencing disks: Now that I'm redoing my main Hyper-V server, I finally got around to playing with differencing disks. I really wish I'd began using it sooner. Let's say you want to deploy four different VM's based on Windows 2008 R2 server - one for Exchange, SQL, Active Directory, File/Print. You set up a "parent" disk image with a base Windows 2008R2 installation and all updates and whatever other software you want the child VM's to have in common, and then set up your VM's which will be based on the parent image. Full step-by-step instructions are HERE, a very good writeup.

In my case I have about 8 different Windows 7 VM's running various worker processes, so before the differencing disk method, each VM had its own 30GB VHD file. Redoing the scheme with differencing disks, now the parent VHD is about 10GB, and the child disks (one for each VM) are around 1GB. So only the delta between the parent image and whatever new software or changes you make to VM's with differencing disks is reflected in the child VHD files. This makes a big difference if like me you're placing your VHD files on fast SSD's, since cost/GB is at a premium.
 
Last edited:

odditory

Moderator
Dec 23, 2010
383
64
28
Dynamic Memory: I first began using Dynamic Memory on my VM's about 6 months ago when the SP1 beta became available. It works beautifully, and now that SP1 was officially released recently everyone should consider using it. This feature allows you to truly oversubscribe memory allocation to VM's, especially if you're installing Windows based operating systems to your VM's. Microsoft really has the edge over VMWare when it comes to dynamic memory with Windows based VM's, because they have access to the Windows kernel team. That's right, when your company has both the hypervisor and client O/S teams under the same roof, you've got an advantage. Truly dynamic memory allocation requires components on not just the hypervisor but also the client O/S - each require awareness of the function, and the mechanism to both give and take memory based on demand.

With my previous Hyper-V server I was able to get away with 8GB of physical memory on the motherboard and still run about 6 x Windows 7 VM's in addition to a fairly busy Windows 2008 R2 server console. I set the minimum memory per machine to 512MB, and the max to 2048. When you do something memory intensive in the VM, say like opening a web browser and holding down CTRL-T to open lots and lots of new tabs, if you watch Performance in windows task manager, you can actually watch the memory being allocated to the VM. Same goes for the hypervisor - you can watch physical memory being taken away. If you close the browser and the memory demand goes down, after about 10-20 seconds you can see the extra memory drain back out of the VM - its very cool.

People will argue about memory oversubscription and whether Hyper-V or VMWare is superior, but again with Windows based VM's there's no contest. The last time I checked VMWare doesn't technically do dynamic memory allocation anyway, but rather block-level memory dedupe - that's a very different approach to memory oversubscription, but does have its merits and thats a separate discussion.

 
Last edited: