• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to change default snapshot location in VMware ESXi 5


    Be default the snapshots which are taken for any vm 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.

    But how will you change the default locations of all the snapshots which will be taken for any vm ?



    These are the required steps to be taken:

    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





    snapshot.redoNotWithParent
    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/50925c85-54a206c1-a9e5-d4ae526b9890/test_XP
    # vi test_XP.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/50925be7-ea8ab367-d40d-d4ae526b9890/snapshots"
    Save the file and exit

    Now you need to reload this vm to make the changes take affect.
    # vim-cmd vmsvc/getallvms | grep test_XP
    56 test_XP [iSCSI-Datastore15] test_XP/test_XP winXPProGuest vmx-07

    Here 56 is the vm id which you can find out using the above command
    # vim-cmd vmsvc/reload 56
    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
    sched.swap.dir="<path_to_vm_directory>"
    For example
    /vmfs/volumes/50925be7-ea8ab367-d40d-d4ae526b9890/vmswap
    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.
    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+


    Do you also have something to share here?
    Join GoLinuxHub Team as an Author, Click here for more information
    How to change default snapshot location in VMware ESXi 5 How to change default snapshot location in VMware ESXi 5 Reviewed by Deepak Prasad on Wednesday, April 17, 2013 Rating: 5

    No comments:

    Powered by Blogger.