VM Snapshot – How to Change default VMware Snapshot location in ESXi 6

In ESX/ESXi 3.x and 4.x, all files comprising vm snapshot are created in the virtual machine’s working directory. By default, the working directory is the same directory as that of the virtual machine (.vmx) configuration file. If the virtual disk (.vmdk) file is located on a different datastore than that of the virtual machine, the virtual disk redolog (-delta.vmdk or -sesparse.vmdk) files are created along with the virtual machine’s (.vmx) configuration file instead of the virtual disk (.vmdk) file.

In ESXi 5.0 and later, virtual disk redolog (-delta.vmdk) files for snapshots are placed in the same directory as the parent virtual disk (.vmdk) file. There are some situations like your VMFS datastore don’t have enough storage to accommodate the vm Snapshot or you may not able to power on the vm due to insufficient space to hold your Swap file in the VMFS datastore. You may need to change the default location of your vm snapshot and point it to the different datastore, where it have enough space to store your snapshot related files (virtual disk redolog (-delta.vmdk)). Specifying the working directory for the virtual machine will ensures that subsequently created vm snapshots cause new virtual disk redolog (-delta.vmdk) files to be created in the defined datastore. This article helps you to configure the Virtual machine working directory step by step.

How to Change default VMware VM Snapshot location in ESXi 6

1.Power off the Virtual Machine

2.Login to your ESxi host using SSH  and browse towards the VM folder location

3.Open the virtual machine’s .vmx configuration file using a text editor like Vi

VM Snapshot

4.Add these  below 2 lines to the .vmx configuration file of the virtual machine, specifying a full path to the directory on a datastore for the workingDir option:

          workingDir = "new_path_location"
                         snapshot.redoNotWithParent = “true”

VM Snapshot


workingDir = “/vmfs/volumes/5452de65-bd1g4b90-g4aa-fd5787f1e370/Snapshot-Demo-snap-Folder”
snapshot.redoNotWithParent = “true”

This ensures that subsequently created snapshots cause new virtual disk redolog (-delta.vmdk) files to be created in the defined directory. In this example, the redolog files are created in the Snapshot-Demo-snap-Folder directory. In ESXi 5.5, if the virtual disk is larger than 2TB in size, the redolog files will be -sesparse.vmdk format rather than -delta.vmdk. By default, the virtual machine writes the swap file in the same directory as the.vmx configuration file. But after the above lines are added in the VM configuration file and When you power on the VM, you can notice the new swap file is created in the defined working directory of the virtual machine. If don’t want your Swap file to be created on the newly defined working directory and want to create it on the same vm parent directory, Please add the below line with datastore location.

                         sched.swap.dir = “new_path_location”

5. Save the changes and close the virtual machine’s .vmx configuration file.

6.Reload the virtual machine configuration by unregistering and re-registering it in the inventory for changes to take effect.

7. Power on the virtual machine.

That’s it. We are done!!!. I hope this post will help you to understand the step by step procedure to change the default location of vm snapshot in VMware ESXi 6.0. I hope this is informative for you!! Thanks for Reading!!. Be social and share it in social media, if you feel worth sharing it.