VMware Communities
sgolux
Contributor
Contributor

New virtual machine grabbing all the memory allocated

I have been a light user of VmWare workstation for five-ish years.  Typically I am running three machines at the same time.

Last week, for the first time in about two years, and first time in Workstation Pro version 15, I spun up a new Windows 10 machine.  And I am having some trouble with it.

One of the previously existing machines is windows 8.1, and two of them are windows 10.

The configuration of the new machine does not look different from any of the old ones.  (But the old ones were not created in Workstation 15, only upgraded to that point along the way).

The old machines, when they start up, only take as much memory from the host machine as they need.  As their memory needs increase, memory is allocated in the host machine.  In other words, if I start up one of the old machines and run no applications I see maybe a 2GB bump in host machine memory usage.  And as I open applications on the (old) guest(s), they use more and more memory and the host machine also uses more an more memory.  Which is as I would expect.

The new machine, which it start up, seems to grab all its allocated memory from the host right off the bat.  That machine has 22 GB of memory allocated for it on the host, but when it starts up all 22GB are then marked as used on the host.  Even though the guest itself is (perhaps) only using 2GB.

This is not preferred behavior, and I can't see anything about the configuration which is different.  I am no expert on VMX files, but a cursory compare doesn't indicate anything that seems significant that would allow for this difference.

Any insights that could help me along here, and could help me re-configure this new machine to it acts more like the old with regard to host memory usage?

Tags (1)
0 Kudos
13 Replies
a_p_
Leadership
Leadership

That's most likely nothing that's related to the host, or VMware Workstation, but rather to the behavior of the guest OS. Physical memory pages are allocated on request of the guest OS. If it e.g. initializes its memory on startup - i.e. touches all the provisioned memory - VMware Wokstation has to allocate that memory on the physical host in order to present it to the guest.

André

0 Kudos
sgolux
Contributor
Contributor

Thank you so much for your thoughts a.p.

I am completely baffled because this is basically just plain old windows 10, with almost nothing but a couple of browsers added so far.  And following your thoughts and insights, I reviewed memory used on the host when the guest starts up but before anyone logs in.  And slowly, over about ten seconds, even just on that logon page, before drivers are even loaded, the exact amount of memory allocated to that guest is used on the host.  On my other windows 10 machines seemingly identically configured and running far more startup programs and such, they will similarly slowly grow on the logon page until they have used about 10% (not 100%) of their allocated memory.

0 Kudos
sgolux
Contributor
Contributor

This has had me so taring out what little is left of my hair that I went back to square one and got a completely vanilla iso from MSDN for Windows 10 Pro, Version 1909, and created a completely standard no-frills VM with it, but altered it so it could allocate up to 22 GB of memory (like my other machines).

After firing up the new VM and installing the OS, it has this same new bizarre behavior, namely that task manager on the host reports that the VM is using 22GB (roughly) of memory, and task manager on the guest is showing itself as using only 2.5 GB.  This is just like my other "new" machine.  This means these new machines will not play well with my old machines that have been upgraded over time, are running same version of the same OS, but don't grab the memory on boot.

Perhaps this is a windows issue, but I have googled repeatedly (without really knowing the terminology) to try to find anything about what settings in Windows would cause this behavior.  I have not found anything.

I would be extraordinarily grateful, whether this is a VMWare configuration issue or a Windows configuration issue, to be able to have my new VMs play nicely with the old ones, and not suck up all the host memory unnecessarily.

0 Kudos
a_p_
Leadership
Leadership

Can you please test what happens with a new VM (same specs as the others), but no OS installed yet?

Please report the result regarding consumed host memory, and attach the .vmx file, as well as the vmware.log file for one of the VMs with the high host memory consumption to your next reply.

André

0 Kudos
sgolux
Contributor
Contributor

Thanks again a.p.

I spooled up a VM where I told it that I would install the OS later, but said that it would be Windows 10.  I configured it as the others, including that it had 22GB memory allocated.  When I powered it up, it spend some time looking for a boot somewhere (maybe partially on the network!) before it gave up and took me to the boot manager.  During that whole period of time, while I was tracking the Host Memory, not even one tenth of one GB was used.

Then I powered up the last VM I had created yesterday with Windows 10 x64 (version 1909).  In about five seconds it showed me the signin screen, but I didn't sign in.  I watched the host memory usage slowly climb over time by the allocated 22GB, which took approximately (by my wristwatch) one minute.  I have included below a screen shot of task manager running on the host, with the one-minute rise in memory use circled with a red pen.  Then after it leveled off, I shut down the guest without signing in.  (That portion is circled in blue).

HostMachineMemoryDuringGuestStartupCircledInRedAndGuestShutdownCircledInBlue.JPG

As you requested, I have also attached the vmware.log file from that session.

Thank you so much for agreeing to look at this.

0 Kudos
a_p_
Leadership
Leadership

Can you please try to fully shut down Windows by either pressing/holding the Shift-Key while shutting down, or by using the command line shutdown /s /f /t 0.

This is to find out whether the Windows fast start feature is involved in the memory allocation.


André

0 Kudos
sgolux
Contributor
Contributor

Thanks.  I wasn't entirely sure what to look for, but here is what I did:

  1. Powered on same VM as before, but signed in this time, and then shutdown with the command you gave me, namely shutdown /s /f /t 0 .  It didn't change any observable messages or behavior of Host memory.  The log file is attached though - the first of two in the attached zip file.
  2. Powered on the same VM as before, immediately following the shutdown described in #1 above.  Also signed in.  And then shutdown in the normal way.  Again, it did not change any observable messages or behavior of Host memory.  The log file is also attached, the second of two in the attached zip file.
0 Kudos
sgolux
Contributor
Contributor

Hello a.p.​ - thanks again for your thoughts.

I have done more research on Fast Boot.  I have seen that it can be turned off on a computer by going to this Power settings screen:

pastedImage_0.png

Then selecting "Change settings that are currently unavailable" and then unchecking the "Turn on fast startup" option.

I could do this on my HOST machine..... (screen shot above comes from the host machine)  but that "fast startup" option isn't even present on my guest machine....

pastedImage_1.png

I would surmise from this that "Fast boot" is not an option on Virtual machines.  I checked all my VM windows guest machines, and none of them had the option on that screen of turning fast boot on or off.  The older guest machines (that don't grab all the memory) and the newer ones (that do) look identical in this regard.

Do you have any further insights or instincts on this?

0 Kudos
sgolux
Contributor
Contributor

And some additional information that may shed some light on this:

Say that I am running my host, with VMWare running but no guests.  Task Manager reports 5GB of memory in use.

I power up one of the guests exhibiting the problem in this issue -- it has 22 GB allocated in its settings.  Task Manager in the guest reports 3GB of memory in use, but now task manager in the host reports 28GB memory in use.

Now I suspend the guest.

Task manager in host drops memory use to 5.5GB.

Now I resume the guest.

Task manager in host grows again to 28GB.

This would imply to me that somehow the guest is grabbing memory outside of the OS, and would seem not to be related to fast boot.  I have tried to read a lot about ballooning, but on first glance it seems like it can be controlled and mucked with VSPhere but not in Workstation.  Unless there are some settings in the VMX file that I can play with?  Any ideas?

Joshdodger197
Contributor
Contributor

Just as a verification of sanity - I am having this exact same issue. I just spent 5-6 hours troubleshooting:

-upgraded from my workstation pro (15.5X) license to a workstation pro 16 trial, then back to 15 for my license

-tried 5 different Win10 VMs, as well and downloaded new ISOs to instal fresh VMs

-ensure all appropriate virtualization setting properly set in host OS UEFI

-also verified this exact same issue happening on another host machine running workstation pro

 

Running an up-to-date Windows host OS. What is going on here?? This memory ballooning is insane.

shmu26
Enthusiast
Enthusiast

I am wondering whether the memory usage reported by the host means what it sounds like. Perhaps the supposedly "grabbed" memory is in fact available? 

Could someone test it, by running additional applications or VMs that will push available RAM to the point of thrashing?

I am suggesting that the reported memory usage is deceptive because I  see self-contradictory readings for memory usage of a Win10 guest running on a linux host. This makes me think that the host has a hard time determining whether memory is just allocated or actually used.  

0 Kudos
ajgringo619
Hot Shot
Hot Shot

Try with Winaero Tweaker - https://winaerotweaker.com/
0 Kudos
aghelp
Contributor
Contributor

Hi shmu26,

Any luck on this front?  I have a similar issue and was wondering if you were able to resolve this, and what steps you might have taken.  Thanks!   I have 4 Pools of VMs, 3 pools seems fine, but 1 pool every VM takes the max RAM available and pegs it right after they boot up.  So I have 15 VMs that are ready to go, but all sitting at max RAM used, even though no one has ever logged into them, and nothing is running.

TC

0 Kudos