Whenever we take a snapshot in the VMware workstation, it keeps that particular state in a separate VMDK file. The virtual machine will work from that file, and any changes inside the guest OS will be added to the snapshot file. Sometimes we have to merge these files to the original base file or delete these snapshot files. In this guide, let me show you how to merge snapshots in VMware Workstation. Also this process is called ‘Snapshot Consolidation.’
The process is simple and straightforward in a VMware workstation or VM player. It may be tricky if you are using vSphere or ESXi servers. But this guide is for home and tech users who use VMware workstations on PCs. Understanding the fundamentals and how snapshot works are recommended before proceeding further. The below steps are applicable for any version of the VMware workstation, like 7 to 16, on any host OS such as Windows, Linux, or macOS.
How Do Snapshots work in VMware?
A snapshot is a particular state of a Virtual machine. It’s like a system restore point in Windows Operating Systems, but slightly different. I would say it is the ‘Time machine’ of a virtual machine.
The snapshot feature allows taking the state of a VM backward and forward. For example, if you have a snapshot that was taken one week ago, you can restore it and get back the exact VM how it was working one week ago.
Taking a snapshot before any upgrade or major changes is the best way to protect a VM in a production or test environment. Each snapshot keeps separate VMDK files under the working folder. We can’t use only certain Snapshot disk files alone without the original base VMDK, previous snapshots, and configuration files in any desktop virtualization software, including VMware and VirtualBox.
Why do We Have to Merge Snapshots?
Good question! It is one of the good practices to keep important system states of the virtual machines as snapshots before any major changes. But after a few days of using the VM, the snapshot becomes invalid. We will not need them anymore to restore and revert back the VM to the previous state. Here are the reasons why we need to delete and merge snapshots in the VMware workstation:
- A particular snapshot is not important anymore.
- To release some disk space on the host computer.
- The snapshot was created accidentally or by any backup software.
- To use or migrate virtual machines in other virtualization software such as VirtualBox or Hyper-V. These programs will not detect VMware snapshot technology. So, the current machine’s state should be merged to the single base VMDK file before converting to VDI or VHD/VHDX.
- To export, import, and share the Virtual machine’s disk file. It is recommended to migrate/move a VM in a single virtual hard disk file.
How to Merge Snapshots in VMware Workstation?
It’s simple, just delete them in the VMware snapshot manager.
Once we delete a snapshot in Snapshot Manager, it will merge with the previous snapshot file. So, if you have multiple snapshots between the first base VM and the current state (You Are Here), you need to delete all of them to merge the current state of the VM to the original VMDK file.
Important Note: DO NOT delete VMDK files directly in Windows Explorer.
Go to the snapshot manager of the particular virtual machine. Select the point and press delete.
This process can be done when the VM is on, but shutting down the guest OS is recommended if you need better performance.
Explanation in our Example:
- The three snapshots (marked as B) with the lock symbol are connected to some other cloned VMs. Some virtual machines are created with these snapshots and run differently. These snapshots are the base for those VMs, and it is called ‘Linked Clones‘. If I delete them, those machines will stop working.
- If I delete D, it will merge with C. You can’t revert back any snapshot deletion, so think twice before pressing the delete button.
- If our purpose is to merge B, C, and D to A, which is having base original VMDK file, then delete all (B, C, D) one by one. It will remove all snapshot VMDK files and add the changes to the original file. So the current state of VM E will go next to A.
Capturing a snapshot usually takes less time, but when it comes to deleting it, it takes more time because it should merge with the previous file.
A few methods are available to merge snapshot files without deleting them, but it is slightly complicated and requires additional tools. These are the simple and easy steps to merge snapshots in a VMware workstation on Windows/Linux or macOS hosts.
5 thoughts on “[Guide] How to Merge Snapshots in VMware Workstation?”
Thanks a lot for the tip, i was wondering if we could do this at all.
That really captures the spirit of it. Thanks for ponstig.
Deleting last snapshot (D) will remove it completely and it will not be merged with the previous one, in general we can merge in-between snapshots by deleting them , otherwise it will not be merged.(www.steefozo.com)
Kindly ignore last comment , even though that was the case on some snapshots that I worked with , but testing this lately shows that deleting any snapshot will remove it completly without merging it ,,