Hi!
I know that .vmem file in virtual machines is a paging backup file. I get this file created when I suspend my VM or make a snapshot, but the VMWare documentation clearly states that it is possible to have this file created on a running VM (or the one that is stopped with a crash). I suspect some setup is required in Advanced tab of .vmx settings, I would greatly appreciate if I would get an advice of what particular flags (or/and parameters) need to be set for this.
Thanks!
vmem files are used when a VM is suspended or when a snapshot that includes RAM is created.
During regular use the VM does not use the vmem file and so I dont see any reason why you want to do this.
Please tell us what made you think that this possible.
And how do you think that access to the vmem file would be perceived by the running VM ?
Do you think that would appear as additional RAM or as a ramdisk ?
Thank you for your answer.
Yes, as far as I undesrtood the standard utilization is the one that you've mentioned.
The reason I want to achieve it is quite simple - I would like to experiment and study the behaviour of my VMs in many different possible ways.
Here is the set of reasons why I've decided it is possible: several articles online, stating that .vmem appears on a running VM (for example - https://petri.com/virtual_vmware_files_explained ), several topics where users ask how to disable .vmem creation on a running VM and also I've inspected running VMs of other people on a vSphere I am working on and sometimes -rarely- they have .vmem files on running VMs without snapshots and non in suspended state.
I suspect that if a setting is set not to store all the VMs memory in RAM (less than 100%), then the part that is not stored in RAM will be kept in .vmem for a running VM. Clearly, I am not arguing one should do it on prod environment, once again - my intention is purely experimental.
I think that Petri article is referring to other VMware products such as Workstation when it talks about .vmem files (you can tell by the screenshots)
vSphere uses a .vswp file when a running VM wants "memory" but the host cannot provide it physically (in really simple terms)
I suggest reading chapters 5 and 6 of this to understand the full set of memory management techniques in vSphere: https://docs.vmware.com/en/VMware-vSphere/7.0/vsphere-esxi-vcenter-server-70-resource-management-gui...
Hi, thanks for your answer.
I would check the documentation that you've shared.
I see why you are confused ...
vsphere uses:
vmem : store the content of the RAM when a VM is suspended or when a snapshot includes RAM
vswp: used to store the content of the RAM while a VM is running
Workstation and VMplayer use:
vmem : store the content of the RAM when a VM is suspended or when a snapshot includes RAM
vmem : backup / store content of RAM while the VM is running
Read my blog : VMware Continuum - Tuning guide - setup the host for expected usage ...
Note: this applies to Workstation and VMplayer - not to ESXi / vSphere
-------------------------------------------------------------------------------------------
Manually creating a vmem-file while a VM is running on ESXi is neither possible nor does it make any sense.