ESXi 5
How to Change the Default Snapshot Location in VMware ESXi 5

By default, VMware ESXi stores virtual machine snapshots in the same directory as the parent VM. If your primary datastore is running low on space, taking a new snapshot can fail or, worse, cause the VM to hang.
Fortunately, you can redirect these snapshots (and swap files) to a different datastore with more “breathing room.”
Phase 1: vSphere Client Configuration
Before modifying files, we need to tell the VM not to store redo logs with the parent.
- Power OFF the Virtual Machine (This is mandatory for the changes to take effect).
- Right-click the VM and select Edit Settings.
- Go to the Options tab > General > Configuration Parameters.
- Click Add Row and enter:
- Name:
snapshot.redoNotWithParent - Value:
true
- Name:
- Click OK to save and exit.
Phase 2: CLI Configuration (.vmx Modification)
Now we define exactly where those snapshots should go.
- Log into the ESXi host via SSH or the local console.
- Navigate to your VM’s home directory:Bash
cd /vmfs/volumes/[DatastoreName]/[VMName] - Open the
.vmxconfiguration file using thevieditor:Bashvi VMName.vmx - Add the following line to the file, specifying your secondary datastore path:Plaintext
workingDir = "/vmfs/volumes/Secondary-Datastore/snapshots"(Pressito insert text, thenEscfollowed by:wqto save and exit.)
Phase 3: Reloading the VM
Changes to the .vmx file aren’t picked up until the VM is reloaded in the inventory.
- Find your VM’s ID:Bash
vim-cmd vmsvc/getallvms | grep [VMName] - Note the ID number (e.g.,
13) and run the reload command:Bashvim-cmd vmsvc/reload 13
💡 Pro Tip: Keeping Swap Files in the Original Directory
By default, the workingDir parameter also moves the VM’s .vswp (Swap) file. If you only want to move the snapshots and keep the swap file with the parent VM for performance reasons, add this extra parameter in the Configuration Parameters (Phase 1):
Name: sched.swap.dir
Value: "/vmfs/volumes/Original-Datastore/VM-Directory"
#VMware #ESXi #StorageAdmin #SysAdmin #Virtualization #vSphere #TechTutorial #LazyAdmin #DataCenter #CloudComputing
