VMware Communities
Lapsio
Contributor
Contributor

Disable paging file in VMWare Workstation 12.5

I need to run VMWare Workstation VMs fully in-memory due to complicated, low performance root storage setup in workstation. Unfortunately when I mount /tmp in 2gb ramdisk Workstation complains about inability to create 4gb pagefile (even though I set "Fit all virtual machine memory into reserved host RAM"). I worked this around by setting ramdisk size to 8gb. The problem is - I don't really have that much ram to give away. Whole workstation has 16gb RAM and it's already hardly enough if 4 or more VMs are running. I typically use 2gb ramdisk for /tmp. If some other application (or even vmware) would accidentally leak 8gb of trash like logs to /tmp system would crash or at least plenty of apps would crash.

So my question is - how can I prevent VMWare Workstation from requiring pagefile space. When I tried to use conventional on-disk /tmp VMs were crashing on SIGBUS alongside with entire system, performance was terrible and kernel was reporting soft lockups on CPUs, everything was freezing. With /tmp in ramdisk everything works great and I'm getting performance level close to bare metal.

Long story short - i need to use ramdisk for vmware tmp files and vmware by default requires too much space in tmp to make it reliable setup on my machine.

0 Kudos
4 Replies
bottkars
Enthusiast
Enthusiast

You can use mainMem.useNamedFile in Workstation in your according .vmx file  to NOT use a seperate paging file per VM

mainMem.useNamedFile = "TRUE"

mainMem.useNamedFile = "FALSE"

This can be set automatically with my VMXtoolkit by using

Get-VMX -path [Path to vm ] | Set-VMXMainMem -usefile [true/false]

get-vmx -Path C:\test\DCNODE\ | Set-VMXMainMemory -usefile:$true

visit my Vmware Workstation/Fusion Powershell Toolkit https://github.com/bottkars/vmxtoolkit https://www.powershellgallery.com/packages/vmxtoolkit
0 Kudos
Lapsio
Contributor
Contributor

Didn't work. After adding mainMem.useNamedFile = "FALSE" VMWare still complains about inability to allocate 4096MB.

0 Kudos
continuum
Immortal
Immortal

Hi
I doubt Workstation is able to do what you require but see yourself.
I collected my tweaking tips  here:
VMware Continuum - Tuning guide - setup the host for expected usage ...
VMware Continuum - How to assign more RAM to VMs than available ...
VMware Continuum - Tuning guide - finetuning memory


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
Lapsio
Contributor
Contributor

Welp. I used mainmem.backing = "swap" but it didn't help either. However tweaking tips are really welcome I'll check them out.

0 Kudos