Quantcast
Channel: VMware Communities : Discussion List - ESXi
Viewing all articles
Browse latest Browse all 8132

Restore VM from -flat.vmdk file only

$
0
0

Hi,

 

I'm posting a solution to an issue of missing .vmx files, because in tracking down an answer I found many unresolved similar threads, and no one with this exact description. HOW the files got lost in the first place is another question, and I'd be happy to get any ideas there, as the only thing out of the ordinary was an almost-full datastore.

 

When I try to open console window for CentOS VM in vSphere Client I get:

Unable to connect to the MKS: Virtual machine config file does not exist.

 

This happens for two of my VMs, all other work fine. The odd thing is, I can still access the VM via Putty, SSH and HTTP. When I look in the datastore of one of them, there are only two files:

vmname-flat.vmdk

vmname.vmsd

 

The *-flat.vmdk file is the data file containing the whole VM disk. The vmsd file contains metadata about snapshots.

 

However, a VM needs two vmdk files:

vmname-flat.vmdk - containing data

vmname.vmdk  - descriptor file, containing meta data about the disk

 

To create a new descriptor file, see KB article 1002511:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511

 

Note that because you don't have the vmx file you need to know the SCSI controller to use. I found it by guessing that it was the same as another machine with the same OS (lsilogic) right-clicking the VM, choose Edit Settings, ticking the box Show All Devices and clicking SCSI Controller 0.

 

After recreating the descriptor file, create a new VM, with the exact same specifications as the old one. Choose custom and when you get to disk, choose to use an existing disk, then retrieve the disk from the previous step. Guide here:

http://techhead.co/vmware-esx-how-to-easily-recreate-a-missing-or-corrupt-vmx-file/


Viewing all articles
Browse latest Browse all 8132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>