How to Recreate Corrupted VMDK file

rebuild the vmdk file from the -flat file

Today one of my friend ask one doubt regarding VMware virtual hard disk (vmdk).question is “Is it any way to recreate VMDK file?”

Yes…! Its very simple process to Recreate VMDK files.

Before going to recreation, need to understand the virtual machine files extensions and purpose of each files of ESX virtual machine

VMware ESX server files extensions details

image fromtechtarget.com

1) vmdk - virtual disk

2) vmx - Configuration file

3) NVRAM – Bios for VM

4) .log – Individual log file for a VM

5) REDO – file used to capture changes to an original vmdk

6) vmss – suspend file for an individual VM, state of VM when suspended

7) vswp – swap file used when ESX is in a memory over commitment situation

8.) vmtd - Virtual Center template, the actual data file(s)

9) vmtx - Virtual Center template header

10) *–flat.vmdk file – This is the actual raw disk file that is created for each virtual hard drive. Almost all of a .vmdk file’s content is the virtual machine’s data, with a small portion allotted to virtual machine overhead. This file will be roughly the same size as your virtual hard drive.

11) *–delta.vmdk file – This is the differential file created when you take a snapshot of a VM (also known as REDO log).

VMware Workstation Files (http://www.vmware.com/support/ws55/doc/ws_learning_files_in_a_vm.html)

I believe you got overall idea about virtual machine files. Next here I’m explain the VMDK recreation steps.

Before start the process, you want to know the existing machine (corrupted VM) disk specification

Step:-1 Identify the existing virtual machine VMDK hard disk space size. If you have multiple hard disk on your virtual machine, you need to know all hard disk space.

Go to virtual machine Edit settings and check with hard disks “provisioning size”

Step :-2 The next we  need to create  same size of hard disks. So I just created temporary virtual machine on my esx server. No need to install Operating system just creates basic configuration with exact size of hard disk (What was the size of your corrupted vm. The same size you need to create)

Step:-3 After creating the dummy virtual machine in your esx then copy the VMDK files to corrupted machine data store by using putty or winscp whatever you have.(only need to copy VMDK files

Step:-4 After copying delete the old vmdk files (corrupted vmdk file and note the name of that vmdk file) and rename the new vmdk file to old vmdk file name.

Then you need to edit new vmdk file, In vmdk configuration there was one object named “Extent description” This object explain where is the atual vm data located so we need to define actual VM data file name. So you just update the corrupted machine FLAT.VMDK fine name. If you have multiple hard disk so you need to update orderly.

Step:-5 After completing above steps start the virtual machine and work on it J

Let me know if you need any assistance

Thanks

Jinto Antony <img src="http://techvault.in/wp-content/plugins/wp-smiley-switcher/noktahhitam/icon_smile.gif" alt="" />

One Response to “How to Recreate Corrupted VMDK file”

  1. Anish Panthalani Says:

    Excellent Job buddy.

    ;0

    Anish Panthalani

Leave a Reply

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 3 + 14 ?
Please leave these two fields as-is:

Powered by Google Talk Widget