Cloning specific intermediate snapshot disks to a new virtual machine without performing a revert
search cancel

Cloning specific intermediate snapshot disks to a new virtual machine without performing a revert

book

Article ID: 435225

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

In some scenarios, a virtual machine (VM) may have multiple snapshots, and there is a requirement to access data from a specific intermediate snapshot without reverting the VM to that state.

This article provides a method to safely extract data from a snapshot by cloning the corresponding snapshot disk and attaching it to a separate VM.

Environment

VMware vSphere ESXi (All Versions).

Cause

Standard snapshot "Revert" operation is destructive to the current data state of the virtual machine and require downtime or state changes that may not be acceptable for data recovery tasks.

Resolution

This procedure can be performed while the virtual machine is powered on. No downtime is required.

Step 1: Identify the Snapshot Disk File


Step 2: Clone the Snapshot Disk

  • Clone the identified snapshot disk into a new standalone vmdk.
  • Example command (run on ESXi shell) (-d thin means thin provision):

    vmkfstools -i /vmfs/volume/<datastore_name>/<VM_name>/<VM_name>-000002.vmdk /vmfs/volume/<datastore_name>/<VM_name>/cloned_disk.vmdk -d thin

  • This process consolidates the snapshot chain up to that point and produces a usable disk.
  • Reference: Cloning and converting virtual machine disks with vmkfstools (343140)

 

Step 3: Create a New Virtual Machine

  • Create a new VM to attach the cloned disk with below hardware specification,

    * Guest OS: same as source VM
    * CPU / Memory: similar configuration recommended
    * Virtual hardware version: match source VM
    * Firmware: BIOS or EFI must match
    * Disable NIC connection by unchecking "Connect At Power On" (This prevents duplicate IP conflicts, domain or application-level conflicts)
    * ADD NEW DEVICE and select the cloned VMDK (cloned_disk.vmdk)


Step 6: Power On and Access Data

  • Power on the new VM
  • Access the filesystem
  • Retrieve required data
  • If it is necessary to copy data out over the network:

    * Modify the IP address inside the guest OS to avoid conflicts
    * If required, change the network adapter’s port group to an appropriate network
    * Then return to vCenter and edit the VM settings
    * Enable the network adapter by checking Connected

Additional Information

  • This method does not merge or alter the original snapshot chain
  • The cloned disk is independent and not linked back to the source VM
  • Do not modify or delete original snapshot files during this process
  • Ensure sufficient datastore space for cloning
  • The cloned disk represents the state up to that snapshot, not beyond
  • Snapshot chains must be intact for cloning to succeed