Sunday, November 30, 2014

Hot add or remove memory for virtual machines on Hyper-V of Windows Server Technical Preview (vNext)

There is one of new features of Hyper-V of Windows Server Technical Preview (vNext). It allows administrator to hot add or remove static memory on virtual machines. Virtual machines aren't needed to shut down to add or remove memory. Hot add or remove memory feature supports generation 1 or 2 virtual machines which are installed Windows 10 (x86 or x64) or Windows Server Technical Preview only. To perform add or remove static memory of virtual machines, administrators can use Hyper-V Manager or PowerShell.

Lab environment
  • 1 Windows Server Technical Preview with Hyper-V role

At this moment, I assigned 1GB memory for a virtual machine which is installed Windows 10 x86.



Then, I used Hyper-V Manager to modify the "Startup RAM" to 2048.


Back to Task Manager of Windows 10.


The memory status of Windows 10 has been updated to 2.0GB.

Then I try to perform PowerShell "Set-VMMemory" to modify the memory to 512MB.

Set-VMMemory -VMName <VMName> -StartupBytes 512MB


Back to Task Manager of Windows 10.


The memory status of Windows 10 has been updated to 512MB.

Remark: If you modify the memory size which is lower than the in use memory, you get the following error message.



However, Set-VMMemory cmdlet will try to modify the static memory of the virtual machine as minimum as possible.


This posting is provided “AS IS” with no warranties, and confers no rights!

No comments:

Post a Comment