ESXi

 View Only
Expand all | Collapse all

How to recover VM machines and add to inventory

  • 1.  How to recover VM machines and add to inventory

    Posted Dec 20, 2009 02:05 PM

    I have this problem either because I am stupid, or because ESXi has limited functionalities. I hope it is the first one :smileyhappy:

    I am running Active Directory test lab on ESXi 4.0 and I just killed the domain controller. I was ment to move that VM to another datastore and I did, the .vmdk file (20GB) is now stored on the primary datastore, which is supposed to be in use. Problem is, I can't apply this vmdk file as VM.

    I tried two different ways;

    1. I created new VM, and chose to use existing disk, browsed to this .vmdk but it is not recognizable. When browsing data store, vmdk files of working VMs have an icon. This one has empty white icon.

    2. I created new VM with hard disk. Then I deleted the new .vmdk and replaced that old one, renamed it propertly. This way VM does not start, complaining about it is not virtual disk.

    Is there any way to restore this DC?



  • 2.  RE: How to recover VM machines and add to inventory

    Posted Dec 20, 2009 02:39 PM

    For whatever reason ESXi is not recognizing the VMDK - was the DC running on this ESXi server or did you moce it form VMware Server? If you hade been running this on the ESXi server had you taken a snapshot?

    If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful



  • 3.  RE: How to recover VM machines and add to inventory

    Posted Dec 20, 2009 03:32 PM

    DC was running on ESXi, I don't use VM Server anymore. Sure I shut it down before moving. I didn't take a snapshot.



  • 4.  RE: How to recover VM machines and add to inventory

    Posted Dec 20, 2009 03:55 PM

    A VNDK is composed of two files. A descriptor file and the actual data. server_disk.vmdk would be the descriptor and server_disk-flat.vmdk contains all the data. The descriptor file is just a text file that contains a description of the disk and a pointer to the flat vmdk file. From the datastore browser you only see the server_disk.vmdk file but it shows to size of the data. Make sure you have moved both parts of the disk.



  • 5.  RE: How to recover VM machines and add to inventory

    Posted Dec 21, 2009 10:16 AM

    I have only .vmdk left which is the main VM's data partition, I don' have that configuration file anymore.

    I got an advice from out Vmware guy, that it's possible to create VM without hard disk, when all other necasserry files would be created, and then just copy this vmdk file into the same folder, and add new virtual disk. But his exprience is based on VMware Server 2.0.

    Is in ESXi 4.0 this opportunaty to create VM without virtual disk?



  • 6.  RE: How to recover VM machines and add to inventory

    Posted Dec 21, 2009 12:04 PM

    As dstavert said, there are two VMDK files the comprise a virtual disk. the flat.vmdk is the actual data disk and the .vmdk is the disk descriptor file. If you only have the.vmdk then you have lost your data. If you lose the .vmdk you can "easily" recover/create a new one of those, but if you lost the flat file ........



  • 7.  RE: How to recover VM machines and add to inventory

    Posted Dec 21, 2009 07:09 PM

    I don't have any "flat" vmdk file in any VM directory, even in still workable one. I took a look what the workable directory of WM containts, and it has only one big (big as the Windows partition is) vmdk file, and lot of small under 100KB configuration files. And there is only one .vmdk file excising, if I see directory over datastore browing.

    So, is it possible to recover this Domain Controller, if I have only one .vmdk file which is big as the partition was in Windows? How I be able to do this?



  • 8.  RE: How to recover VM machines and add to inventory

    Posted Dec 21, 2009 12:21 PM

    Did you rename the vmdk filename after moved to the other datastore?



  • 9.  RE: How to recover VM machines and add to inventory

    Posted Dec 21, 2009 07:11 PM

    I probably did rename it, and I even don't remember the original name of the VM (it was different than Windows's hostname).



  • 10.  RE: How to recover VM machines and add to inventory
    Best Answer

    Posted Dec 22, 2009 08:44 AM

    You cannot rename VMDK filename of EXSi, otherwise the vmdk file is unable to mount up.



  • 11.  RE: How to recover VM machines and add to inventory

    Posted Dec 22, 2009 09:10 AM

    So did I really fucked up the system permanently, or is there something I can do? Is there any recovery method or maybe a tool...?



  • 12.  RE: How to recover VM machines and add to inventory

    Posted Dec 22, 2009 09:32 AM

    Do you really forget the original vmdk filename? You just change it back to original filename that should be OK.



  • 13.  RE: How to recover VM machines and add to inventory

    Posted Dec 22, 2009 07:55 PM

    I dig up the original's file name info, now I know what was the original name of that .vmdk. I changed the file name to original, then I created new VM with this name, created empty same sized virtual disk, and after that I overwrote it. It gives the same error at the startup, that the file or disk is not valid.

    I think, that the problem is, that ESXi does not recognize this file as a hard drive, it has empty white icon, not the blue/gray one.