In ESX/ESXi 3.x and 4.x, all files comprising snapshots are created in the virtual machine's working directory. By default, the working directory is the same directory as the virtual machine's (.vmx) configuration file. Thus, if the virtual disk (.vmdk) file is located on different datastore than the virtual machine itself, virtual disk redolog (-delta.vmdk) files are created alongside the virtual machine's (.vmx) configuration file instead of beside the virtual disk (.vmdk) file.
You may want to change the location where virtual disk redolog (-delta.vmdk) files are created, in order to:
- Create snapshots, but do not have enough space on the VMFS volume.
- Power on a virtual machine when there is not enough space to create a swap file on the VMFS volume.
This article describes a method to change the default virtual machine working directory location used for snapshots on ESX/ESXi 3.x and 4.x.
Note: In ESXi 5.0 and later versions, virtual disk redolog (-delta.vmdk) files for snapshots are placed in the same directory as the parent virtual disk (.vmdk) file. If present, the snapshot directory settings are removed during a disk migration. This requires additional steps that are outlined below
To change the default virtual machine working directory location for snapshots:
- Power off the virtual machine
- Open the virtual machine's .vmx configuration file in a text editor. For more information, see Tips for editing a .vmx file (1714)
- Add a line to the .vmx configuration file for the virtual machine, specifying a full path for the workingDir option:
workingDir = "new_path_location"
workingDir = "/vmfs/volumes/46f1225f-552b0069-e03b-00145e808070/vm-snapshots"
This ensures that subsequently created snapshots will cause new virtual disk redolog (-delta.vmdk) files to be created in the defined directory.
- (Optional) If the virtual machine has not been powered on previously, a new swap file is created in the virtual machine's working directory or the host's when the virtual machine is powered on. If the virtual machine writes its swap file in the same directory as the virtual machine's .vmxconfiguration file, add this line to the .vmx configuration file:
sched.swap.dir = "path_to_vm_directory"
This ensures that the swap file is created in the same directory as the virtual machine's .vmx configuration file instead of in the virtual machine's working directory.
- Save the changes and close the virtual machine's .vmx configuration file.
Note: If you are using ESXi 5.0 or 5.1 you will also need to specify that the redolog (-delta.vmdk) file are not placed on the parent disk of the VM as they normally would be. Follow below steps.
To specify snapshot delta files should be kept in the same directory as the location specified in the workingDir parameter, you must add the new parameter snapshot.redoNotWithParentto the virtual machine's configuration file.
To modify the snapshot storage location:
1. Ensure that the virtual machine is powered off.
2. Right-click the virtual machine and click Edit Settings.
3. Click the Options tab.
4. In the Advanced Options, click General.
5. Click Configuration Parameters.
6. Click Add Row.
7. In the Name field, type snapshot.redoNotWithParent.
8. In the Value field, type true.
9. Find the workingDir field in the list. If it does not exist, create it.
10. In the Value field, verify and ensure that you have a valid datastore path. This value usually starts with /vmfs/volumes/.
11. Click OK to save the configuration parameters.
12. Click OK to save the virtual machine settings.
13. Power on the virtual machine.
Note: If you are performing a storage vMotion or storage migration of a virtual machine that has its working folder set to a location other than the virtual machine directory, this change is not maintained and you must reconfigure it as necessary.
Reload the virtual machine configuration by unregistering and re-registering it in the inventory. For more information, see Registering or adding a virtual machine to the inventory (1006160).
Power on the virtual machine.
For more information on 3.0 and 4.0 redirects see:
For information on 5.0 redolog move for the snapshot redirects see:
Changing the location of snapshot delta files for virtual machines in ESXi 5.0 (2007563).
Please be aware that we’re making changes which will restrict access to product updates for users without an active contract.