Configuring a memory reservation on the virtual machine will change the size of the required vswap file. These are some examples of the vswap file size changes that occur when changing the virtual machines reserved memory.
Note: The virtual machine must be powered off for the vswap file size when changing the memory reservation.
Virtual Machine with no Memory Reservation
In this example, the virtual machine has no reservation and the vswap file size is the size of the allocated memory to the virtual machine.
Virtual Machine with 50% Memory Reservation
In this example, the virtual machine has 50% of its allocated memory reserved, reducing the vswap file to the remaining 50% that is not reserved.
Virtual Machine with 100% Memory Reservation
In this example, the virtual machine has 100% of its allocated memory reserved, this will reduce the vswap file to needing no storage space
Note: There is a second vswap file created with the prefix vmx that is the swap file for the overhead memory reserved for the VMX process.
To disable the vswap file for the VMX process:
- In the vSphere Web Client, power off the virtual machine.
- Right-click the virtual machine and click Edit Settings.
- Click the VM Options tab and expand Advanced.
- Click Edit Configuration.
- Click Add Row.
- Enter the name sched.swap.vmxSwapEnabled.
- Enter the Value false.
- Click OK.