Recreate header/descriptor vmdk files & recover failed Storage VMotion (DMotion)

I had a another problem with Storage VMotion yesterday and found out a couple of interesting things.

Firstly, there is a now a Knowledge Base article explaining how to recreate vmdk header files if they are missing.  This was news to me, so here’s the link:

http://kb.vmware.com/kb/1004232

Secondly, was discovering a sightly different approach to recovering a failed Storage VMotion (DMotion).  My previous experiences had involved something along these lines:

http://communities.vmware.com/message/999890#999890

Which basically breaks down to creating another snapshot, so that you will then be able to force a vmware-cmd …/vmname.vmx removesnapshots

However this approach was messy, didn’t always commit properly and required editing the vmx file.

So yesterday, when facing a similar problem, I saw it resolved in slightly different way.  We started by checking the linking of parentCID to CID in the vmdk header files, as we had an issue with all the different DMotion snapshot files.  Then to commit the snapshots, we used vmkfstools -i <last_snapshot.vmdk> <destination.vmdk> to clone the disk to another file.  By sending the clone command to the last snapshot header file, it knew to roll all the chained snapshots, along with the original disk, into this new copy.

Obviously this method requires extra space for the second copy and can take longer, but you have the advantage that the original are untouched.

Update:

VMware has just released a new KB article covering the whole process: http://kb.vmware.com/kb/1007849

Leave a Reply