Friday, 4 December 2015

Check For Virtual Machine Memory Reservation From Inside the VM's Guest

Written by Suhas Savkoor



If we wanted to check whether we have any memory reservations done for the VM, we go to the virtual machine's Edit Settings and under Resources tab we will be able to see the CPU and memory reservations. 

Now, I came across this issue when I was working with a customer:

The customer was trying to install a Mobile View software on his Windows virtual machine and this software was checking for memory reservation on the VM. 
This was very "peculiar" indeed, and we were having a discussion regarding how a virtual machine works. The discussion included that the virtual machine is not aware that it is actually virtual. It thinks that it is a physical machine and continues to behave like one. 

But the question remained, how the software was able to check memory reservations. The installation would not proceed further and would pop a error, "Not enough memory reserved" 

Then, I questioned, what about VMware tools? Can the guest query VMware tools for memory reservations done on it? 

Well, it turns out it can query VMware tools for this information.

Open a Command prompt from the VM:

For Memory Reservation:

Change Directory to 
C:\Program Files\VMware\VMware Tools

Run the command 

For CPU Reservation:

Change Directory to 
C:\Program Files\VMware\VMware Tools

Run the command 

The output is something as seen below:


So the guest does know!!