With Service Pack 1 to Windows Server 2008 R2, Microsoft adds a very valuable feature that can save you money on memory and virtualization host computers. If you are using the Hyper-V virtualization role, you may be able to take advantage of Dynamic Memory (DM). Using this memory-management feature, you can probably increase the number of guest Windows computers that can run simultaneously on your host(s) at no additional cost. In a larger Hyper-V environment, managing DM properly can yield high returns on investment. The keys to getting the most efficient use of DM are (1) knowledge of how DM works and how it’s enabled, and (2) a tool like Microsoft System Center Virtual Machine Manager (SCVMM) to monitor DM across multiple Hyper-V hosts.
In Microsoft’s first release of Hyper-V hypervisor technology in 2008, users were not able to allocate more memory to virtual machines (VMs) than was physically present on the host computer. A typical 8-GB host computer could run, for example, three VMs assigned 2-GB memory each, leaving 2-GB for the host operating system (OS). Now with Service Pack 1 to Windows Server 2008 R2, Hyper-V VMs can enjoy progressively more total memory than is installed on the host. That same 8-GB host computer might now be able to run four, five, or even more VMs, each allowed to receive up to 2-GB memory. DM achieves this by moving memory between VMs — draining memory from idle systems and boosting memory in systems that demand it.
How to enable Dynamic Memory and use it
DM will not turn itself on. You must explicitly define a Hyper-V guest computer as a DM-aware client in the VM’s Hyper-V guest configuration, after updating the client OS and/or Hyper-V guest integration services. The default option for Hyper-V guest VMs is to use static (non-DM) memory. To enable DM for a particular VM, follow these high-level steps:
- Upgrade your Windows Server 2008 R2 Hyper-V host to Service Pack 1.
- If necessary, update the OS of the Windows guest VM.
- If necessary, upgrade the integration services of the guest VM.
- Modify the VM settings in Hyper-V to use DM, selecting startup and maximum RAM (see the orange-circled area in Figure A).
Memory Status and Dynamic Memory settings for Hyper-V guest computers (click to enlarge)
A must-read before deploying Windows 2008 R2 SP1 on Hyper-V hosts is the “Hyper-V Dynamic Memory Configuration Guide.” That reference includes these important tables:
- Support for DM by guest OS: This usually requires updating the guest Windows OS to the latest service pack as well as updating the Hyper-V guest integration tools.
- Recommended startup memory by guest OS: Rule of thumb is 128-MB for 32-bit OS and 512-MB for 64-bit OS.
Manage VMs across hosts to squeeze every drop of memory
If you have more than one Hyper-V host, SCVMM 2008 R2 can really maximize your overall host investment. By easily moving VMs strategically between hosts depending on their memory requirements, the most memory-demanding VMs can end up efficiently distributed. Also, there is just no substitute to viewing all your VMs across all your hosts in a ‘single pane of glass’.
By upgrading SCVMM 2008 R2 to Service Pack 1, or by performing a new install of SCVMM 2008 R2 SP1, Hyper-V users gain insight into the dimension of Dynamic Memory. Figure B shows a view of the SCVMM console, an orange circle indicates the columns of DM settings and live DM status that are added to SCVMM 2008 R2 by SP1.
Manage Dynamic Memory across hosts with SCVMM 2008 R2 SP1 (click to enlarge)
Tips and notes
- SQL server is a demanding application for a guest VM. You’ll find a DM-enabled VM running SQL will often end up using the maximum memory. Either limit the maximum SQL server memory setting of your SQL server VMs, or plan on SQL VMs using their maximum DM memory.
- Verify a guest OS is working with DM (blue arrow in Figure A), before depending on the VM receiving the memory it needs to run. If you assume the VM supports DM, but it actually does not, the guest is stuck with startup memory only.
- There is no stand-alone upgrade package or Microsoft Update package for SCVMM 2008 R2 SP1. The only distribution vehicle for the service pack is in an integrated SP1 install of the complete SCVMM product, in licensed or evaluation editions.
- You can still do an in-place upgrade to SP1, but the download package is large-the whole, updated SCVMM product.
- The service pack is not available through Microsoft Update because there is an installer task that asks for database (DB) credentials in order to update the SCVMM DB to contain the new settings for DM.
- Licensed owners of SCVMM 2008 R2 can download the SCVMM 2008 R2 SP1 integrated install media from Microsoft Volume Licensing sites, MSDN, etc.
Download the software
Install Windows 2008 R2 SP1 using Windows Update or manually download the appropriate Windows 2008 R2 SP1 package at this link:
Install an evaluation edition of SCVMM 2008 R2 SP1 by downloading at this link: