Moved VMDK to new server/Guest/VM and lost data
search cancel

Moved VMDK to new server/Guest/VM and lost data

book

Article ID: 393914

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When moving a VMDK from "GUEST/VM 1" to "GUEST/VM 2" , "GUEST/VM 2" no longer has the same data that "GUEST/VM 1"  had when it was powered off.   When "Guest/VM 2" is powered on we see a period of missing data such as "the last week of data" resulting in "Data Loss" 

Environment

VMware ESXI (All Versions)

 

Cause

The VMDK was running on a snapshot prior to the move. When the VMDK was moved to "GUEST/VM 2" Only the Base disk for the VMDK was moved.   

As "GUEST/VM 2" only had access to the base disk and not the snapshot chain any changes made to the VMDK when running the snapshot will be lost.   As when you manually point a VM to the "base disk"  and power it "on" the VMDK will be written to.  This invalidates the snapshot chain and any data in that chain will be lost as the snapshot chain is no longer consistent,  as the snapshot pointers are no longer valid. 

Resolution

As the snapshot chain is no longer consistent due to the changes made, you will have to Restore the VMDK from backup if the data from the missing period is needed. 

To prevent this from happening in the future.  The VMDK should be consolidated and then verification should be made that it is no longer running on snapshots before the VMDK is moved to the new Guest/VM.  You can clone the VMDK to the new location as well which will consolidate the snapshots and leave the original VMDK untouched.   

 

Reference KB

Overview of virtual machine snapshots in vSphere