VMware Cloud Community
yannara
Contributor
Contributor
Jump to solution

How to recover VM machines and add to inventory

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

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?

Reply
0 Kudos
1 Solution

Accepted Solutions
Ray_Chiang
Enthusiast
Enthusiast
Jump to solution

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

View solution in original post

Reply
0 Kudos
12 Replies
weinstein5
Immortal
Immortal
Jump to solution

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

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
yannara
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

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.

-- David -- VMware Communities Moderator
yannara
Contributor
Contributor
Jump to solution

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?

Reply
0 Kudos
mpverr
Enthusiast
Enthusiast
Jump to solution

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 ........

Reply
0 Kudos
Ray_Chiang
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
yannara
Contributor
Contributor
Jump to solution

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?

Reply
0 Kudos
yannara
Contributor
Contributor
Jump to solution

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

Reply
0 Kudos
Ray_Chiang
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
yannara
Contributor
Contributor
Jump to solution

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...?

Reply
0 Kudos
Ray_Chiang
Enthusiast
Enthusiast
Jump to solution

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

Reply
0 Kudos
yannara
Contributor
Contributor
Jump to solution

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.

Reply
0 Kudos