How to: Re-create the missing VMDK File Descriptor.

Never give up - The effort and daily dedication make a person a winner
The following article describes how to recreate the VMDK file of a virtual machine.

It is important that this file is always in the datastore where the VM is stored, because if the VM is not present, it will not be able to turn on and an error

I  hope it is very useful for everyone.


First, what is a VMDK file in a virtual machine?

The disk description file or .vmdk, is a metadata file that contains data that describe the geometric characteristics and size of the disk where the data will be stored.

A virtual disk is made up of two files:
• File descriptor, its extension is (.vmdk).
• Flat file, where the data is saved, its extension is (flat.vmdk).

Example of a VMDK descriptor file (See image 1.0).

1.0.Parameters of a VMDK file.

I explain a summary of the origin of the problem:

In my virtual environment we currently have several virtual servers configured with the SCSI-Bus Sharing controller, which allows sharing virtual disks between virtual machines.

One of the limitations of this controller is that it does not allow vmotion with the virtual machine on, which is why we proceeded to turn off the server to perform the migration.

Once I made the migration of the virtual machine I proceeded to turn it on, but the following error appeared (See images 1.1 and 1.2).

1.1. When turning on the virtual machine, it indicates the following error:

1.2. Validating server events, it indicates the following:

Validating the datastore where the server is hosted, I could see that the VMDK file was not present, which is why it prevents me from turning on the virtual machine. (See images 1.3).

1.3.Virtual machine without the VMDK file present in the Datastore.

Throughout the article I will describe the steps to recreate the VMDK file of the virtual machine.

Activate the SSH service on the ESXi Host:

1.1.Select the ESXi, click on the Manage option.

1.2.Select Security Profile - Click on Edit.

1.3.Select SSH option. It can be seen that the SSH service is stopped.
Click on Start.

1.4.The SSH service is running. Click on OK.

1.5.In the task bar you can see that the SSH service started.

1.6.Login via SSH to the ESXi Host,using Putty. Enter the IP address of the ESXi.

Re-create the missing VMDK File Descriptor:

1.1. Enter via SSH to the ESXi where the affected virtual machine is hosted. Enter credentials
Go to the path where the virtual machine is stored. See attached image.

1.2. Once on the route, enter the command ls -lah, to validate the virtual machine records.

1.3. Enter the command less * .vmx | grep -i virtualdev To validate the VM controller.

1.4. Enter the command ls -l followed by the name of the vm along with the extension flat.vmdk.
To validate the Id of the disk.

1.5. We will carry out a cloning with the vmkfstools utility, to create a temporary file of the virtual disk, as it is visualized in the image.
-c: Indicates cloning the disk - Id of the disk.
-a: Type of virtual controller.
-d: Type of disk format

1.6. Go to the Datastore where the VM is stored and validate the creation of the temp.vmdk registry.

1.7. Validate the file system of the VM, and validate that the records are found:
temp-flat.vmdk and temp.vmdk. As shown in the picture.

1.8. Enter the command mv -i temp.vmdk followed by the name of the VM, to enter the registry. See attached image.

1.9. The parameters of the temp-flat.vmdk record are displayed.

2.1. Go to the Extent description parameter.
Replace the name temp-flat.vmdk with the name of the VM "VEPPHFEX12-flat.vmdk"

2.2. Enter the command rm -i to remove the temporary record. Press the "Y" key, to confirm the deletion. See attached image.

2.3. Go to the Datastore where the VM is stored and validate the creation of the disc descriptor record VEPPHFEX12.vmdk.

2.4. Enter the vi command to enter the disc descriptor record.

2.5. Move to the The Disk Data Base parameter.

2.6. Select the parameter ddb.thinProvisioned = "1" and delete it.

2.7. The parameter was removed, it is no longer found in the descriptor file.

2.8. Execute the vmkfstools -e command to check the consistency of the virtual disk.
       Example: vmkfstools -e VEPPHFEX12.vmdk.

2.9. Go to the inventory of the vCenter and turn on the VM.

3.0. It is displayed in the inventory that the VM is on.

3.1. Click on Launch Console to validate that the operating system starts.

3.2. It can be seen that the operating system started without problems.

Congratulations, your virtual disk has been rebuilt and your VM can now be turned on without problems.

Never give up - The effort and daily dedication make a person a winner

Comments (9)

Distinguished Expert 2018


Good afternoon Andrew,

Make other modifications to the article, I remain attentive to your comments.
Distinguished Expert 2018


Good afternoon Andrew,

Thank you very much, for your help and recommendations, they helped me a lot.

Best regards.

I am trying to recreate the virtual machine disk file with the above mentioned solution but seems stuck/confuse at the step where i need to edit the newly created .vmdk file, i renamed it as with the original vm name. but when i use vi VM-NAME.vmdk , i am not able to see any content in the file it shows blank file.

Now from where i can edit the descriptor file under the Extent Description, since no content is visible in the vm-name.vmdk file.

My Current Infrastructure is : V-Center HA with two hosts and mounted different data stores using ISCSi share datastores from different storage.

V-Center version: 5.5.0 Build 1300321
Hosts esxi version: 5.5.0 Build 1623387

where i am going wrong. an urgent response is needed on the query since this is a production server and its vmdk is missing since this morning abruptly.

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
Expert of the Year 2017

@Nabeel Ahmed

I would recommend if you need URGENT attention to the issue I would Ask a related question.
Distinguished Expert 2018



Please share the screens until the step you arrived, ask a question to help you.


View More

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
You Belong in the World's Smartest IT Community