VMware Cloud Community
vmfu
Contributor
Contributor
Jump to solution

snapshot problem

One of VM has several snapshot taken before. Suddenly , the harrdisk has corrupt. I recover VM by using  Disk recovery software. Some files are corrupt ,cannot be recovered .Now it has the issue of broken snapshot chain.

VMSD files are corrupt. But VMDK delta flat disk amd base disk.

From VMware website and forum, I can re-create VMX file by recreating new VM and modifying some settings.

VMDK descptions file can be re-created by using vmfstools according to VMware official website.

Do anyone whether there are any methods to re-create VMSD files or VMSN files?

I also find the document to fix the issue of broken snapshot chains. Do you know how to commit the snapshot one by one if VM has several snaphots?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

You are right about the CID/parentCID, these values just have to be unique. However, according to the log files and the file .vmdk sizes the current snapshot order is: 4 -> 1 -> 3 -> 2 -> base. I created the appropriate descriptor files for you (see attachment). You just need to rename/edit them and replace the "xxxxxx" with the real names. Make sure you use an editor (not Notepad) which is able to edit files with Unix like line breaks!

Once you uploaded the descriptor files you should be able to create a clone using:

vmkfstools -i w2k3_xxxxxx-000004.vmdk w2k3_xxxxxx_clone.vmdk

Btw, the .vmsn as well as the ...-ctk.vmdk files can be deleted.

André

View solution in original post

0 Kudos
6 Replies
a_p_
Leadership
Leadership
Jump to solution

Please post a complete list of files (ls -lisa from the command line), which you were able to recover. To find out which files need to be restored or fixed and how the snapshot order has to look like, please compress/zip all the available descriptor .vmdk files (the small text files) as well as any vmware.log files you have and attach them to your next post. Please let me also know how much free disk space you have available on your datastore(s).

The .vmsd and .vmsn files are not important unless you want to revert to a snapshot (what I assume you don't want).

André

0 Kudos
abirhasan
Enthusiast
Enthusiast
Jump to solution

Please have a look followings article . May help..

http://communities.vmware.com/thread/338167

abirhasan 
0 Kudos
vmfu
Contributor
Contributor
Jump to solution

Hi Andre,

Attached is the list of the files recovered and logs. But all VMDK description file (.vmdk) ,VMSN, VMX , VMSD are corrupt.

I replaced VM name in vmware log files to "win2k3". Datastore has many enough space.

I manually created vmdk description file for base disk, snapshot delta disk.

I am not sure the order of snapshot Assume snapshot chain is Base disk -> Snapshot 1 > Snapshot 2

Then I assign the CID and parentCID as follow:

CID of base vmdk disk :11111111

CID of snapshot 1 delta vmdk file: 22222222

ParentCID of snapshot 1 delta vmdk file: 11111111

CID of snapshot 2 delta vmdk file: 33333333

ParentCID of snapshot 2 delta vmdk file: 22222222

Because all my VMDK files are corrupt. I cannot find CID and ParentCID. The CID is randomly generated.Can  I assigned any CID that I want?

When I ran the following command as below, the error "The Capacity of each link is different" and "The parent disk has been modified since the child was created" was found as attached.

vmkfstools -i win2k3-000001.vmdk newvm.vmdk

Thanks!

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

You are right about the CID/parentCID, these values just have to be unique. However, according to the log files and the file .vmdk sizes the current snapshot order is: 4 -> 1 -> 3 -> 2 -> base. I created the appropriate descriptor files for you (see attachment). You just need to rename/edit them and replace the "xxxxxx" with the real names. Make sure you use an editor (not Notepad) which is able to edit files with Unix like line breaks!

Once you uploaded the descriptor files you should be able to create a clone using:

vmkfstools -i w2k3_xxxxxx-000004.vmdk w2k3_xxxxxx_clone.vmdk

Btw, the .vmsn as well as the ...-ctk.vmdk files can be deleted.

André

0 Kudos
vmfu
Contributor
Contributor
Jump to solution

Hi André,

Thank you so much! I recoverd VM successfully.

One more thing I need to know about VMDK descriptor file.

# Extent description

RW 41943040 VMFS "win2k3_xxxxxx-flat.vmdk"

I know the word "RW" mean read and write.

What is the value of "41943040"? Is the value same as all the VMDK descriptor file of all snapshot (delta disk).
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Glad to hear it worked.

What is the value of "41943040"?

This is the provisioned size of the virtual disk in blocks (512 bytes).

41,943,040 * 512 Bytes => 21,474,836,480 Bytes / (1,024^3) = 20 GB

André