On VMWare ESX3 (I tried already on ESX4 and it works!) , your VM has one or more VMDK files (extension .vmdk) and one or more flat vmdk files (last characters flat.vmdk )
In some cases, you may corrupt, lose or accidentally delete your VMDK files. Your VMDK’s contain metadata for your flat.vmdk files. Without your VMDK’s, you cannot load your flat.vmdk-files. Consequence: you cannot load the VM in your VirtualCenter and you cannot start the VM.
The following steps will guide you to recreate your vmdk files (.vmdk):
- Determine the hard disk sizes of your original VM (I call this VM from now on: VM A)
- Create a new VM (I call this VM from now on: VM B) with VirtualCenter with the same number of hard disks as your old VM, and the exact same sizes. So: if your original VM contained 2 harddisks from 8,00GB and 12,00GB, recreate these harddisks exactly the same in your new VM.
- After your VM B has been created, use Putty (or a similar tool) to navigate to your ESX server. Then navigate to the location / directory where your VM B is stored.
- Copy all VMDK’s (not the flat ones, but only the metadata files) to your VM A directory. The filesize of your META-data files should be a few KB.
- Navigate to your VM A directory. You just copied the *.VMDK files to this directory. Edit the VMDK’s with a text editor: (For my case i using nano inside the ESX server)You should replace the old filenames with the correct file names -> They refer to the new VM B, but they should refer to your old (original) VM A **
- Save the files.
- Load the VM in your VirtualCenter. You should now be able to add th flat.vmdk to your VM.
** # Extent description RW 62914560 VMFS "your_new_VM-flat.vmdk" to RW 62914560 VMFS "your_old_VM_name-flat.vmdk" and save