Virtual Memory or VMEM is a file extension used by virtualization software like VMware, Virtualbox etc. VMEM files generally store RAM or Physical Memory of the related virtual machine.
Below we can see that there is file named
564dfc3d-5bac-9fd4-b200-6f492dc81f20.vmem . Name is a UUID which is unique and created to store RAM. We can see that the size of the file is about 3.1 GB. We can delete this file securely without a problem.
VMEM files can be edited by other applications. This will create problem because VMEM file holds virtual machines memory. In order to prevent VMEM file edit lock files are used. This VMEM lock files have
vmem.lck extension which is a folder.
VMware support different configuration about Memory or VMEM files. Here some of them
Enable/Disable Memory Sharing
By disabling memory sharing your guests will not share common memory blocks. Your VMware product will also stop comparing memory blocks.
sched.mem.pshare.enable = "FALSE"
Use Named File
Doesn’t use named-file – use for VMs on USB-disks or other slow disks. On Windows: useNamedFile= “FALSE” causes memory to be backed by the host’s swap space.
mainMem.useNamedFile = "FALSE"
Fit Memory Into RAM
Fit memory into RAM. Whenever possible, avoid settings lower 100%.
prefvmx.minVmMemPct = "100"
We can configure virtual machine memory from
Virtual Machine Settings ->
Memory. This configuration will also affect
vmem file size because the memory will be written into
vmem file with the same size.