Remove stuck snapshot through Storage VMotion
A customer of mine had a virtual machine with a stuck snapshot. When you looked in the snapshot manager you wouldn’t see a snapshot. But when you looked on the file system through the Service Console, you would see that there was a so called delta file witch indicates that there is a snapshot active.
Later on I discovered you could also see this when you look at the properties of the disk in the vSphere client.
So than the question was how to merge this snapshot without loosing data?
While thinking about this question, I saw a note of mine how Storage VMotion works.
- First all the files except the vmdk files are copied to the new location of the Virtual Machine
- The content of the vmdk (not the vmdk itself) is copied to the new location. All the changes during this copy is kept in a bitmap.
- When the first copy is finished vSphere looks at the size of the bitmap file. If this file is to large step 2 is repeated.
- If the bitmap file is small enough, vSphere does a quick suspsend-resume action. This means that the Virtual Machine is suspended, all the remaining files are copied to the new location and the machine is resumed again from the new location.
- The final step that the ‘old’ location is cleaned-up.
The trick is in step 2. Not the vmdk is copied to the new location but the content. So Storage VMotion merged the to original vmdk and delta file together for me.
About Michael
Michael Wilmsen is a experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture.
Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.