VMware Cloud Community
SilkBC69
Contributor
Contributor

Move working directory with snapshots

I have a VMware server that will be retired within the next three months due to age.  I have been getting alerts that there are snapshots that require consolidation.  When I try to consolidate them, it errors out with Input/Output error it seems the storage disks are having some issues.

There are three virtual disks on this particular VM, and they each have almost 150 snapshot files, and they keep getting made.  I have tried the suggestion of manually creating a snapshot then clicking "Delete all snapshots" but that fix the issue.

Today, I attached a NAS, so I could move the VMDKs to it.  I also found out that you can change the "working directory" for where the snapshots are kept, and I thought I might be able to change that to the NAS, but I am not sure if you can do it with existing snapshot files?

I was thinking that maybe this would work:

  1. Shut down the VM
  2. Edit the .vmx file to add the line to point to the working directory
  3. Move all the snapshot files to the new working directory
  4. Fire up the VM

That sounds too easy, though and I am sure there is a whole bunch missing.  I guess my question basically is, how is the best way to handle this?  I suppose I *could* manually copy all the VMDK files and related snapshots to the NAS manually, then remove the VMDKS and re-add them as existing drives?  If I do that, I assume I would select the most recent snapshot file as the VMDK to use?

Thanks! 🙂

Reply
0 Kudos
2 Replies
scott28tt
VMware Employee
VMware Employee

Manually moving and editing files is likely to make things even more messy than they already are.

I would focus on how to consolidate all those snapshot files.

If you really can’t find an in-GUI option that will work to get those snapshots consolidated, why not use Converter inside the VM (in it’s current state) and create another VM onto your NAS?

Then switch to using the new one (depending on whatever app/service it is offering) and delete the old one.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
a_p_
Leadership
Leadership

Like already mentioned, moving snapshots requires a lot more than just moving some files. There's also metadata involved, which would need to be edited, if possible at all.

Before separating base virtual disks and snapshots, it's also important to understand how snapshots work in VMware products. Virtual disks with snapshots are used as a chain, where all chain links are being used. Placing snapshots on other storage, or tiers may therefore impact performance. Also keep in mind that snapshots do not replace backups!

That said, let's see whether, and how the current issue can be fixed. No promises though, due to the I/O errors.

If the converter approach (V2V) that has been mentioned doesn't work, it may be possible to clone the virtual disks from the command line. If cloning the VM from the command lin is what you want to do, then I need some information to provide you with the required steps.

  • ESXi version/build
  • the VM's current datastore name, and the one for the target (NAS)
  • a complete list of files in the VM's folder
  • the VM's configuration (.vmx) file as well as its current vmware.log file

For the file list, enable SSH on the ESXi host, and use e.g. putty to connect to it. Then go to the VM's folder (cd /vmfs/volumes/<datastore-name>/<folder-name>), and run the command ls -lisa > filelist.txt

Once done, download the above mentioned files as well as the filelist.txt from the datastore, compress/zip the 3 files, and attach the resulting .zip archive to your next reply.


André

Reply
0 Kudos