question

NicciNinow avatar image
0 Votes"
NicciNinow asked MikeRusso-2858 commented

Hyper-V dynamic memory not working Windows 10

My VM is not changing it's memory allocation, even though I have dynamic memory enabled. Any ideas?

  • Host is Windows 10 Pro Insider Preview build 20190, up-to-date

  • Guest is Windows 10 Enterprise Evaluation build 19041, up-to-date

From what I can tell, Windows 10 should sort out the integration services itself and dynamic memory should work. There shouldn't be anything special required to make it work. Maybe it's because the Guest is an earlier version of Windows. Ideally I'd like to be able to get it to work these versions.

Disclaimer: I am new to Hyper-V.

windows-10-hyperv
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

Is your host physical or virtual? How do you set the memory of the VM?
Please also check Memory Demand and Memory Status for the selected VM in the info pane at the bottom of Hyper-V manager.
17849-2020-08-17-164236.png

Please refer to this link for more details
https://docs.microsoft.com/zh-cn/archive/blogs/chrisavis/monitoring-dynamic-memory-in-windows-server-hyper-v-2012

Best Regards,
Ian



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TimCerling-5039 avatar image
0 Votes"
TimCerling-5039 answered

What are you expecting to see? What do you have configured as the startup memory for the VM? Is the VM performing anything that would require the VM to go beyond the size of the startup memory?

With a single VM, there is often no need for the size of virtual memory to change, particularly if you have the initial size of the memory large enough to handle the contents of the running VM. Dynamic virtual memory is most useful when multiple VMs are running and requesting more memory than what is available on the host. When the host reaches a point of not being able to allocate the memory to a VM that is being requested, it will look to other VMs to harvest unused or least used memory by trimming them through the other VMs' normal memory management. If there is no memory pressure on the system, you may not see any adjustment on the VMs' memory sizes.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NicciNinow avatar image
0 Votes"
NicciNinow answered MikeRusso-2858 commented

@IanXue-MSFT

Thank you for your reply! The link explains things very well, especially the monitoring aspect which I'd like to implement.

It's a physical host - my laptop. I'm using the VM as a development environment.

I set the memory of the VM in the settings.

18007-image.png

18006-image.png

@TimCerling-5039

I expected to see the memory allocation to adjust itself post-startup. Initially I had too little memory allocated, expecting the dynamic memory component to scale up after startup. It did not. Then I tried allocating too much memory, expecting it to scale down. It did not - doesn't seem to scale at all.

At the moment it is one machine, yes. I am hosting on my laptop want to be able to prioritise the work I am doing on this host over the guest.

18093-image.png


image.png (275.2 KiB)
image.png (52.2 KiB)
image.png (45.3 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

"Then I tried allocating too much memory, expecting it to scale down. It did not"

Without memory pressure from either the host system or other VMs, I would not expect it change. On your image, you said you wanted 8192 MB to start the machine, even though it needed only 4669 MB. So it gave it what you asked for. With nothing else on the system to ask for the excess memory, there was no need to fhe VM to release its memory.

Without similar information about your other example, i.e. assigning not enough and not seeing it get it, it's hard to explain that situation. Though I have never seen dynamic memory not expand when there was available memory for it to use.

0 Votes 0 ·

Your explanation for why it hasn't changed down makes sense.

Here is what it looks like when I don't allocate enough memory:

18583-image.png

And there is ample memory available on the host. It looks like the VM is using virtual memory to fill in the gap, but this makes VM run slowly.

18632-image.png


0 Votes 0 ·
image.png (52.9 KiB)
image.png (139.2 KiB)

The memory status warning indicates that there is not enough physical memory available to assign any memory buffer to the virtual machine. You'd check the available memory by the performance monitor counter Hyper-V Dynamic Memory Balancer\Available Memory.
You may refer to this link to check how much memory is available
https://support2.microsoft.com/en-us/help/2962295/virtual-machine-that-s-running-on-windows-server-2012-r2-doesn-t-start

0 Votes 0 ·
Show more comments