Enabling Dynamic Memory

Enabling Dynamic Memory

  • Comments 6


If you have not tried out dynamic memory yet – here is a handy step-by-step guide for how to get it setup.

The first thing you need to do is to install the Windows Server 2008 R2 SP1 beta release.  To do this you should:

  1. Download the beta from here: http://www.microsoft.com/windowsserver2008/en/us/sp1.aspx
  2. Shutdown any virtual machines before installing the service pack in the parent partition
    • Saved states and snapshots from Windows Server 2008 R2 RTM are compatible with the SP1 beta release – so there is no need to discard them.  Note – this may not be the case with the SP1 RTM release.
  3. Apply the service pack
  4. Reboot the physical computer

At this stage you will have the service pack 1 beta applied to your system – but you will not have enabled dynamic memory for any of your virtual machines.  There are two main steps to enabling dynamic memory.

Step 1: Upgrading the integration services inside the virtual machine

Dynamic memory needs new integration components to be installed in the virtual machine.  If you are running Windows Server 2008 R2 or Windows 7 inside of the virtual machine you can do this by either upgrading the integration services or by just installing the service pack 1 beta inside the virtual machine as well.  For all other supported operating systems you will need to upgrade the integration services.  To do this you will need to:

  1. Boot the virtual machine
  2. Connect using the Virtual Machine Connection window from the Hyper-V manager
  3. Log in with an account that has local administrator rights on the virtual machine
  4. Open the Action menu and select Insert Integration Services Setup Disk
    Capture2 (2)
  5. Depending on the guest operating system you are running – you may need to select to start the integration services installer (or it may run automatically)
    Capture3
  6. When prompted to upgrade the Hyper-V integration services – click OK
    Capture4
  7. When the installation is completed and you are prompted to reboot – click No
    Capture5
  8. Now shutdown the virtual machine

The next step is to enable dynamic memory in the virtual machine settings.  To do this the virtual machine needs to be turned off, which is why you needed to shutdown the virtual machine instead of letting it reboot.


Step 2: Enabling dynamic memory in the virtual machine settings

Once the virtual machine is no longer running, you will need to:

  1. Open the virtual machine settings
  2. Change to the Memory page
  3. Select the Dynamic option
  4. Set the Startup RAM to be as low as is necessary for the virtual machines guest operating system to boot.  512mb is a good figure to choose for most operating systems
  5. Set the Maximum RAM to an appropriate value (it will default to 64GB of RAM – and for many people this will be fine.  All of my virtual machines have a maximum RAM value of 64GB)
  6. Hit OK
    Capture6

You can now start the virtual machine.  You should be able to tell when dynamic memory starts functioning inside the virtual machine as you will see a percentage getting reported in the Memory Available column for any virtual machine which has dynamic memory enabled.

Cheers,
Ben

Leave a Comment
  • Please add 1 and 7 and type the answer here:
  • Post
  • Looks excellent. I currently use 4 test machines of 1600MB RAM each on my 8GB host. I expect to be able to run at least one more using this.

    2 Questions:

    1. Will there be an upgrade from SP1 Beta to SP1 RTM?

    2. The Dynamic Memory Technical Overview whitepaper mentions "Applications that perform their own memory management". Does MS SQL Server - specifically SQL Express 2008 - fall under this category? Should I wait until SQL server release their own "enlightened" update before deploying?

  • Hello Ben

    Did you test dynamic memory ??

    because for me only works once, then the VM still has the startup value..

    Rémy

  • Tried to install SP1 beta on Windows 2008 R2 server core with Hyper-v

    the dynamics memory is not enabled in the Windows Server 2008 R2 Guest even after upgrade the Integration Service.

    Tried the hyper-v on the Full Windows 2008 R2 Server installation it works

    Is it by design can't be enabled when runnning on the server core?

  • just found the solution, need to upate my windows 7 to SP1.

    So the Hyper-v remote administration GUI interface also updated to show the Dynamics Memory.

  • Jonathan -

    Yes, there will be an upgrade path from beta to RTM.  Also, we are working with the various server product teams at Microsoft to have them provide guidance around how to use dynamic memory.

    Rémy -

    I have been using it since January on my servers :-)  What is your guest operating system?

    klil -

    Glad that you figured it out!

    Cheers,

    Ben

  • Hello Ben:

    I noticed that in the Msvm_MemorySettingData Class,there is no any element to map for "specify the percertage of memory",how can I get this information in WMI?

    newhuber

Page 1 of 1 (6 items)