GlennBrett
Contributor
Contributor

Move Snapshot location

Jump to solution

Is there a process for moving the location of the snapshot files?

Snapshots can potentially take up a large amount of disk space. We would like to introduce a seperate datastore purely for Snapshot files.

Is this possible?

Assuming it is, is this a reasonable thing to want to do?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
depping
Leadership
Leadership

Welcome to the forums,

Take a look at Eric Sieberts tip:

I would suggest though to use snapshot moderate. And have 20% free space on a volume for snapshotting. don't let the snapshot be active for days and days, use and commit.

Duncan

VMware Communities User Moderator

-


Blogging:

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
10 Replies
depping
Leadership
Leadership

Welcome to the forums,

Take a look at Eric Sieberts tip:

I would suggest though to use snapshot moderate. And have 20% free space on a volume for snapshotting. don't let the snapshot be active for days and days, use and commit.

Duncan

VMware Communities User Moderator

-


Blogging:

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
GlennBrett
Contributor
Contributor

Thanks for the quick reply.

I have taken a look at the notes you suggested. Seems fairly straight forward.

I am a little puzzled by the statement "If your VM is on shared storage and you specify local storage as a location you will not be able to use Vmotion/HA/DRS."

Shared Storage? Aren't all data stores shared storage? I have allocated two data stores for Snapshots, both 200GB and both will be accessed by all VMs on the Cluster (for their Snapshots). I suppose I could have defined a data store on some JBOD, physically attached to the VM hosting server.

Local Storage? Is this suggesting that I ought not to put the Snapshot on a locally attached hard disk (as opposed to one on the SAN)? If so, not being able to use Vmotion and HA seems reasonable (although I am not sure about DRS -- it seems harsh not to be able to use DRS to manage Memory and Processor if the data disks are locally attached).

Would the strategy of housing snapshots away from the base VMDK files cause us problems in the future, should we want to Vmotion/Migrate to an alternative Cluster? Or, would the Vmotion/Migrate wizards ask us to supply a location for the Snapshot (and potentially, the Swap file)?

The more I read Eric's statement the more I believe my assumptions are correct. We do use Shared Storage for all aspects of our VMs (EMC SAN).

Before I blunder in and start changing things, I'd just like to be crystal, so sorry for the rambling self-answering nature of this post!

BTW, Snapshot Moderate?

0 Kudos
djciaro
Expert
Expert

The working directory determines the location of swapfiles

Stop your VM logon to Console and edit the VMX for the VM

find the line: workingDir = "DESIRED LOCATION" and enter your new location

if you want to swapfiles to saty in the same directory add or edit the following line: sched.swap.dir = "DESIRED LOCATION"

Edit VM in VI client, check the 2nd tab (options) and make sure that the Virtual machine working location is specified correctly.

then restart your VM.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!
Nick_F
Enthusiast
Enthusiast

We just leave 15-20% free on each volume for snapshots, I can see some advantages for having a dedicated snapshot datastore but I'd be worried about issues it may cause in future (although you can ofc just edit the VM settings and change the snapshot location back).

DRS relies on VMotion hence the limitation and yes it's because local storage would only be accessible by the ESX server it was part of so you can't move Vms that rely on that local storage to a different ESX server.

I can't think of any obvious issues with using a dedicated snapshot datastore on shared storage, not sure if Storage-VMotion would work though (a standard VMotion shouldn't be affected as disk locations aren't affected).

GlennBrett
Contributor
Contributor

I followed the instructions within Eric's Tip Sheet, with success. On powering up my test VM, a swap file (and a subsequent snapshot file) was created on my new snapshot disk.

I did note a new line at the end of the vmx file:

fileSearchPath = "/vmfs/volumes/<name of snapshot disk>;."

This setting appeared after the initial power-up (after adding the workingDir line to the vmx file). I also note that there is a ; at the end of the path name. Should I be considering adding the location of the vmx (etc) files in here, after the ';' ?

Perhaps this setting only relates to snapshot/swap files. Prior to my adding the workingDir line, there was no setting for fileSearchPath, presumably because it was using the default setting (i.e. the vmx file location)?

0 Kudos
oreeh
Immortal
Immortal

Beware: Never (!!!) move a VM to another folder or datastore when workingDir and / or fileSearchPath is set as this will break the VM!

0 Kudos
GlennBrett
Contributor
Contributor

Oreeh, are you suggesting I have moved something I ought not to have?

Further investigations seem to suggest that fileSearchPath is dynamic and is set when the VM powers up. It appears to hold several hidden files too (.fbb.sf ::: .fdc.sf ::: .pbc.sf ::: .sbc.sf :::.vh.sf.)

workingDir wasn't in the vmx file at all, until I used it to change the location of the snapshot files.

0 Kudos
oreeh
Immortal
Immortal

No, I only said IF you place snapshots at another locatíon then don't move the VM.

0 Kudos
GlennBrett
Contributor
Contributor

Thanks for the warning.

This brings me back to one of the points I mentioned in my second post of this thread:

"Would the strategy of housing snapshots away from the base VMDK files cause us problems in the future, should we want to Vmotion/Migrate to an alternative Cluster? Or, would the Vmotion/Migrate wizards ask us to supply a location for the Snapshot (and potentially, the Swap file)?"

0 Kudos
oreeh
Immortal
Immortal

Vmotion isn't a problem. Storage Vmotion might but I'm not sure as I simply never tried it - and due to the pathname bug in the hosted products I avoid workingDir and fileSearchPath like the plague.

0 Kudos