There are a number of improvements to Linux Support in Windows Server 2012 R2 Hyper-V. One of the ones we figured out before the announcements, thanks to the public nature of the Linux builds (Linux Integration Services are in the kernel), was the added support for Dynamic Memory in Linux guest OSs … only supported on WS2012 R2 Hyper-V, even if you can get it working on WS2012 Hyper-V.
I set up a Ubuntu 13.04 VM … the install on my virtual SOFS via SMB 3.0 was quick because I was using iWARP NICs with vRSS enabled in the guest OS of the virtual file servers. I configured the memory of the VM as follows. Note that the Minimum RAM (if idle and the guest OS is able) is 32 MB.
I booted the Ubuntu VM up, let it sit for a couple of minutes, and this is what I saw:
The memory pressure was low, so the VM ballooned down from the Startup RAM of 1024 MB down to 150 MB, then 144 MB, and then 139 MB. I’m not even going to say that this would be the lowest point; the memory demand (95 MB above) and assignment (139 MB above) dropped every few minutes while writing this post. Nice This will be very good news for hosting companies and large enterprises that want to use Hyper-V to run lots of Linux guests, in addition to the other features that WS2012 R2 Hyper-V can offer.
FYI: do not set up DM for Linux guest as I did. I suspect a bug (and have logged one): DM and the the guest OS will do their best to get the VM down to the minimum RAM. So much so, that the OS kills processes one by one until the kernel panics, somewhere at around 121 assigned MB RAM So be a little more realistic with the minimum RAM setting.