Create snapshot in a different location than the default virtual machine folder

In order to create snapshots in an different location to the default virtual machine folders or to change the location where the virtual machine swap file is located the below can be performed in instances where there is not sufficient disk space to create a snapshot or a virtual machine may not be powered on as the swap file may not be created:

1) Power off the virtual machine.

2) Open the configuration file (.vmx) in a text editor

3) Add the following lines to the configuration file:

The below will cause new virtual disk redolog files to be created in the defined directory when a snapshot is created:

workingDir = “/vmfs/volume/datastore/server”

For Example; workingDir = “/vmfs/volume/datastore1/vm1”

The below is optional. By specifying a different location for snapshots, the swap file will also be created in the working directory. The directory to create the swap file can be defined by the following:

sched.swap.dir = “/vmfs/volume/datastore/server”

For Example; sched.swap.dir = “/vmfs/volume/datastore1/vm1”

4) Save the configuration file.

5) Remove the virtual machine from the inventory

6) Add the virtual machine to the inventory be registering the configuration file.

7) Power on the virtual machine

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s