VMFS Recovery™
Recover data from damaged or formatted VMFS disks or VMDK files
Recover data from damaged or formatted VMFS disks or VMDK files
Last updated: Jul 30, 2024

Mastering VMware Snapshot Recovery

Although snapshots are not 100% reliable or replace typical backups, they are very important as they help VM admins roll back to a point-in-time backup. VMware supports taking snapshots of VMs hosted within its virtualized environments. There are different types of snapshots supported by VMware, but the purpose remains the same.

Understanding VMware Snapshots

What is a VMware Snapshot?

A VMware snapshot refers to a point-in-time capture of a vSphere VM, recording the state of the VM at that time and the data stored inside. When a VMware snapshot is captured, the following records are saved:

  • The current state of the VM as of when the snapshot was taken – whether the VM is powered on/off, or suspended.
  • All files and data saved on the VM at the time the snapshot was taken, including the virtual disk, network interfaces, and memory information.

The essence of taking snapshots is to have a “Restore Point” to roll back a VM to, when the system fails or in a case of data loss – not necessarily to serve as backup copies. A snapshot preserves the state of a VM at a particular time, so if you made a major update (or you’re about to make a major update on a VM), you can record a snapshot to save the VM’s state before/after the update, so you can have a recovery point to roll back to if things didn’t go as planned.

The Role of Snapshots in Data Protection

Snapshots provide you with a safe version of your VM to revert to if things go wrong. This is very important in a product testing environment where there are multiple trials carried out. Also, in environments where there are multiple VMs with similar configurations, taking snapshots regularly can be important to reserve the VMs’ state at specific times.

Just as you roll back Windows systems to a “Restore Point” when you start seeing different error screens/messages, snapshots serve as restore points for virtual machines in the VMware vSphere environment. The benefits snapshots serve differ by administrators and the purpose of the virtual machines being hosted in the environment.

But mainly, snapshots are particularly useful in environments where repeated rollbacks are needed timely. The snapshot feature is available on VMware products: ESXi hosts, VMware Workstation, and vCenter Server. Snapshots can be taken irrespective of whether the VM is powered on, powered off, or suspended – in a vSphere environment. It is also possible to record multiple snapshots – as many as you feel is enough and at any interval. Learn more about the best VMware snapshot practices.

Creating and Managing VMware Snapshots

Talking about VMware snapshots, you may want to know how to create them; well, these snapshots are not too technical to create and manage. But then, you must understand that snapshots operate on individual VMs. For example, if you need to take snapshots of multiple VMs, you have to take the snapshots separately for each of the virtual machines.

The tools you need to create and manage VMware snapshots are available on the vSphere Client web tool if you’re running ESXi. You can also create snapshot trees to make it easier to manage and revert to snapshot versions; a branch in a snapshot tree can save up to 32 snapshots – pretty much a whole lot.

How to Create a Snapshot

The most common snapshot type is Memory Snapshot, and to take a memory snapshot, the VM must be powered on. The other snapshot type is called Quiesce Snapshot; this is also taken when the VM is powered on, but you must have VMware Tools installed to take this snapshot.

To continue taking snapshots, you must verify that the VM has the Virtual machine.Snapshot management.Create snapshot privilege. If the privilege exists, then follow the steps below:

  • Launch vSphere Client
  • Navigate to a virtual machine section and click the Snapshots tab.
  • Select “Take Snapshot.”
  • When the dialogue box pops up, write a name for the snapshot, and optionally include a description.
  • Check the Snapshot the virtual machine’s memory checkbox to take a memory snapshot (optional).
  • To take a Quiesce snapshot, which requires pausing any running process on the VM Guest OSes while the snapshot is being recorded, select the Quiesce guest file system (requires VMware Tools) checkbox.

(Note: You cannot check both the memory and Quiesce snapshot options, you have to select only one).

Now, click Create/Take Snapshot.

Best Practices for Snapshot Management

Although up to 32 snapshots are allowed in a snapshot tree branch/chain, VMware recommends that you delete your snapshots within 24 hours to save space. Also, it is not advisable to manually modify a snapshot chain/branch as such actions could result in data loss.

It is equally important to note that while rolling back I/O-intensive VMs with snapshots, significant data inconsistencies might occur. This is why snapshots are not the absolute failsafe for VMs used in high-demand environments, instead, local backups would do.

Limitations and Considerations

Snapshots utilize as many resources as the parent VMs, which means they can take up so much storage over time, and the more data you store on the VM, the longer the snapshot time would take to create/restore.

Data centers need to mix snapshots with local backups to achieve an absolute failsafe for data loss scenarios. Also, having multiple snapshots in production environments can put more strain on the CPU and result in performance degradation, which further validates the need to have local backups to go along with the snapshots.

Note: VHD recovery

Snapshot Recovery Process

In the real sense, you’re not recovering a snapshot, instead, you’re reverting a VM to a previous state. Recovering a snapshot is quite as easy as creating one; you do it from the snapshot manager in your vSphere Client or VMware Host Client.

Steps to Recover a VM from a Snapshot

  • From the home screen, navigate to Virtual Machines 🡺 Snapshots 🡺 view the snapshot hierarchy
  • Select the snapshot you want to revert to and click on “Restore” or “Revert.”

That’s it, your VM’s state will be rolled back to its state as of when the snapshot you selected was created.

Efficiently Restoring VMs from Snapshots

To ensure that your VM returns to the exact state you wish when reverting to a snapshot, you must be attentive during the snapshot creation; make sure the VM is in the exact state you’d want it to be whenever you revert to the snapshot, and also choose the snapshot type carefully.

Once a snapshot is created and you revert to it, your VM will return to the exact state as recorded by the snapshot; this means if the VM was powered off or suspended during the snapshot, as you revert to the snapshot, the VM would be suspended or powered off.

Troubleshooting Common Recovery Issues

Solutions for Common Problems Encountered During Snapshot Recovery

Snapshot Chain Broken: The snapshot chain is broken, causing recovery failures.

Solution:

  • Identify the missing or corrupt VMDK file.
  • Use VMware's built-in tools or third-party software to attempt a repair of the snapshot chain.
  • Restore from a recent backup if the snapshot chain cannot be repaired.

Insufficient Disk Space: Insufficient disk space preventing the snapshot from merging back into the main disk.

Solution:

  • Free up disk space on the datastore where the VM resides.
  • Repair VMware disk if necessary.
  • Move some VMs to another datastore temporarily to create the necessary space.
  • Consider expanding the datastore if possible.

Corrupt Snapshot Files: Snapshot files are corrupt, leading to recovery issues.

Solution:

  • Use VMware's vmkfstools command to check and repair disk files.
  • If repair is not possible, revert to the last known good snapshot or backup.
  • Implement regular integrity checks to catch corruption early.

VM Performance Degradation: The VM experiences performance issues after recovering from a snapshot.

Solution:

  • Consolidate snapshots regularly to prevent performance degradation.
  • Ensure the host system has sufficient resources (CPU, memory, storage).
  • Optimize the VM’s configuration and resources allocation.

Snapshot Consolidation Failure: Snapshot consolidation fails, leaving orphaned snapshots.

Solution:

  • Manually consolidate snapshots via the VMware vSphere Client or command line.
  • If manual consolidation fails, use VMware's KB articles and support for advanced troubleshooting.
  • Check for underlying storage issues that might be causing consolidation failures.

Permission Issues: Permission issues prevent snapshot recovery.

Solution:

  • Verify that the user account has the necessary permissions to perform recovery operations.
  • Adjust permissions as needed within the VMware environment and on the underlying storage.
  • Ensure that no other processes or users are locking the snapshot files.

Efficiently Restoring VMs from Snapshots

Preparing for VM Restoration

Pre-Restoration Checklist

  • Verify Snapshot Integrity: Ensure the snapshot is complete and not corrupted.
  • Check Available Resources: Confirm sufficient CPU, memory, and disk space for the restoration.
  • Backup Current State: Create a backup of the current VM state to prevent data loss.
  • Review Dependencies: Identify and prepare any dependencies or connected services that may be affected.
  • Communicate Downtime: Inform stakeholders about potential downtime and expected restoration time.

Ensuring Data Integrity

Ensuring the Integrity and Consistency of Data

  • Validate Snapshot Consistency: Use VMware tools to check the consistency of the snapshot.
  • Perform Disk Checks: Run file system checks on virtual disks before and after restoration.
  • Monitor for Data Corruption: Watch for signs of data corruption during and after the restoration process.
  • Test Data Access: Verify that data within the VM is accessible and intact post-restoration.

Restoration Procedures

Detailed Steps to Restore a VM from a Snapshot

  • Power Off the VM: Ensure the VM is powered off to avoid conflicts during restoration.
  • Access Snapshot Manager: Open the Snapshot Manager in VMware to view available snapshots.
  • Select the Snapshot: Choose the desired snapshot from which to restore the VM.
  • Initiate the Restoration: Start the restoration process and monitor for any errors or issues.
  • Verify Restoration Completion: Confirm that the restoration process completes successfully.
  • Power On the VM: Once restored, power on the VM and ensure it boots correctly.

Post-Restoration Verification

Steps to Verify the Successful Restoration of the Virtual Machine and Its Functionality

  • Check System Logs: Review system and application logs for any errors or warnings.
  • Validate Network Connectivity: Ensure the VM can connect to the network and access necessary resources.
  • Test Application Functionality: Run tests on key applications to confirm they are functioning as expected.
  • Monitor Performance: Observe the VM's performance to ensure it meets operational requirements.
  • Document the Process: Record any issues encountered and steps taken during the restoration for future reference.

Ready to get your data back?

To restore and recover VMware data, documents, databases, images, videos, and other files, press the FREE DOWNLOAD button below to get the latest version of DiskInternals VMFS Recovery® and begin the step-by-step recovery process. You can preview all recovered files absolutely for FREE. To check the current prices, please press the Get Prices button. If you need any assistance, please feel free to contact Technical Support. The team is here to help you get your data back!

What More?

VMware snapshots are really important and can come in handy on various occasions. However, regardless of how often you take snapshots of your VM, it is important to make local backups too; snapshots are not completely reliable, but local offshore backups are reliable to a great extent and can be a real savior in critical times.

Well, if your VM’s snapshot is missing – probably due to a deleted VMDK file – you can recover the VMDK file and snapshots using DiskInternals VMFS recovery. The software is intuitive and simple to use by both newbies and professionals.

Related articles

FREE DOWNLOADVer 4.23, WinBUY NOWFrom $699

Please rate this article.