[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


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

Published on
3,833 Points
1 Endorsement
Last Modified:
R@f@r P@NC3R
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.

  • 6
  • 2

Author Comment

by:R@f@r P@NC3R
Good evening Andrew,

Correct, the procedure indicates how to create the descriptor of the VMDK file, I will take into account all your suggestions and recommendations to improve the article, tomorrow I will annex all the recommendations that you are indicating to me and I will upload it again to be evaluated.

Best regards

Author Comment

by:R@f@r P@NC3R
Good afternoon, apply the recommendations indicated in the article.

Waiting for your comments.
LVL 129

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Hello, $vJR-LDv

The Introduction, and Parts 1.0 to 1.6 are confusing. I think an explaination is needed as to what makes up the virtual disk....

I've been reviewing the technical content of your EE Article.

I think the opening Introduction is a little confusing.

The article is a HOWTO, of how to re-create the missing VMDK file descriptor.

If I was writing the article... I would start with..something like...

the background to this problem, Cannot Power on virtual machine...

error message - When powering on a virtual machine, you see a File not found error.

Checking the host server using PuTTY (SSH)

is - a pair of files make up a virtual disk.

a normal VMDK file is  

a)  filename-flat.vmdk <---- this contains all the disk data
b)  filename.vmdk <----- this is a text file ---> called the file descriptor

the above filename on occasion disappears, and we have to re-create it!

That is the crux of the problem...

You have a good screen shot showing the missing VMDK file descriptor...which you can use as an example, and then lead into the re-creation of the file, which solves the issue.

To allow you time to make your edits as suggested by myself, I have moved the article back to "Draft and Author Review" status.

Please use "Save as Draft" while making any additions and changes, and only use the "Submit" button once you feel they are both ready for publishing.

Thank you and I'll look forward to reviewing your work again.


Andrew Hancock
Experts Exchange Page Editor
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!


Author Comment

by:R@f@r P@NC3R
good afternoon Andrew,

Make the indicated modifications.


Author Comment

by:R@f@r P@NC3R
Good afternoon Andrew,

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

Author Comment

by:R@f@r P@NC3R
Good afternoon Andrew,

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

Best regards.

Expert Comment

by:Nabeel Ahmed

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.

LVL 129

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
@Nabeel Ahmed

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

Author Comment

by:R@f@r P@NC3R

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


Featured Post

Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Join & Write a Comment

This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month