VMware Cloud Community
Ompakim
Contributor
Contributor

VMDK file missing, only -flat and -delta file left

Hello

Last night I received a notification that one of my VMs had gone down. When I tried to start it up, I got an error message saying it failed because it cannot find the VMDK file specified.

I don't know how this happened, but I noticed that my VM went down around the same time as my backup job was running, and the backup job failed with the following error message: "Processing <vmname> Error: Detected an invalid snapshot configuration."

The missing VMDK file is called "FELEKTRO-AV-000001.vmdk", but when browsing the datastore, I only see the following files:

Ompakim_0-1624139131573.png

So I have an FELEKTRO-AV-flat.vmdk file, and I have an FELEKTRO-AV-000001-delta.vmdk. Is there any chance that these are the base VMDK file and a snapshot?

At first I thought the -flat.vmdk file was the only file I needed, so I rebuilt the VMDK file using this guide: https://kb.vmware.com/s/article/1002511, but after starting it up I noticed that the VM image was now from 2017, so I assume the -flat file is an old snapshot (?).

Is it possible to merge/append the delta-file to the -flat file to recreate the currently missing VMDK-file?

Attached you'll find the vmx, vmsd, ls -lah output and some vmware logs.

Thanks for all your help - any suggestions appreciated.

0 Kudos
3 Replies
IRIX201110141
Champion
Champion

If you re-create a VMDK descriptor file you have to take care of the reference (-flat.vmdk) and of course the parent when you have a VM which runs on Snapshot(not a good idea).

So create a new FELEKTRO-AV-000001.vmdk with reference to FELEKTRO-AV-000001-delta.vmdk and parent FELEKTRO-AV.vmdk.

But you may have f*cked it up already because your base VMDK get new changes (it have newer date right now) because you create the descriptor wrong and powerd it up. Since your Snapshot is extremly large and holds more than 50% (no wonder if its there for 4 years!) there is a small change that you can override the already changed blocks. You should make a copy of all files first before start messing around.

Its also possible to merge the snap and base back into a single vmdk and than run some windows filechk on.

Regards,
Joerg

0 Kudos
Ompakim
Contributor
Contributor

Thank you, I will give it a go.

I made a copy of the files before messing around, so will start from scratch. I agree on everything you say - I was handed this mess from an earlier operative.

0 Kudos
IRIX201110141
Champion
Champion

I always fix stuff like these in a simple way because iam not so savvy when it comes to the descriptor file.

  1. Create a new Dummy VM with the same specs (SCSI Controller, Disksize, Disktype)
  2. Create a snap on the VM

Now you can use the dummy.vmdk and dummy-000001.vmdk as a template and just copy and rename it into your VM which is in trouble. Make the changes to match your flat/delta and the reference of course.

grep vmdk *.vmx

show which Disks are configured within the VM.

There is a vmkfstools parameter for checking the snapshot chain.

Regards,
Joerg