Defaulty the snapshots which are taken for any virtual machine are stored with their parent in the same directory or storage. Sometimes you may run out of space and you might not be able to take anymore snapshots so in that case you can always use some other location for the storage of snapshots.
NOTE: Please ensure that the vm you are working on is powered OFF.
Right Click the vm and select Edit Settings
Click on Options from the top TAB, select General and open the Configuration parameters
Add a new row with the following details
Save this parameter with a value “true” as shown below
Now open the CLI of the host where the vm is located
Go to the vm’s parent directory where all the vm files are stored and open the main .vmx file
As in my case
# cd /vmfs/volumes/53652b45-90f342h4-v3r3-s5dw676h5674/Windows2003
# vi Windows2003.vmx
Now add this line anywhere in the .vmx file with the path location where you want your snapshots to be stored
workingDir = “/vmfs/volumes/54332bf4-gd3bf353-g45b-g2ft353b5545/snapshots”
Save the file and exit
Now you need to reload this vm to make the changes take affect.
# vim-cmd vmsvc/getallvms | grep Windows2003
13 Windows2003 [iSCSI-Datastore15] Windows2003/Windows2003 win2003 vmx-07
Here 13 is the vm id which you can find out using the above command
# vim-cmd vmsvc/reload 13
Now when you take snapshots the snapshot files and vm swap files will be created in a different location.
How to redirect vm’s swap file
In case you do not want vm swap file to be redirected to another location and you want it to the same parent directory.
Add an extra parameter in the Configuration Parameter option shown above
Save the settings and exit. Now each time you take snapshot the snapshot files and vm swap files will be saved at specified different location.