Creating snapshots in a different location than default virtual machine directory

KB ID: 1241
Product: Veeam Backup & Replication
Version: 5.x, 6.x
Published: 2011-10-06
Last Modified: 2020-08-13
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please try again later.

Purpose

 


Solution

To change the default virtual machine working directory location for snapshots:


  1. Power off the virtual machine
  2. Open the virtual machine's .vmx configuration file in a text editor. For more information, see Tips for editing a .vmx file (1714)
  3. Add a line to the .vmx configuration file for the virtual machine, specifying a full path for the workingDir option:

workingDir = "new_path_location"

         Example:

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.


More information

For more information on 3.0 and 4.0 redirects see:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002929
 
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).

Click here to send feedback regarding this KB, or suggest content for a new KB.
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please try again later.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please try again later.