VMware Cloud Community
novicesx
Contributor
Contributor

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

Dear folks,

Another wierd situation I ran into this morning. We have an ESXi 4 with several VM's running. As I tried to open the console of one of the VM's running Oracle Enterprise Linux, I got the following error message:

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

The ESXi we have has 2 datastores. I browsed the datastore where the VM was stored but was surprised to see that there was no folder for this VM at all. I couldn't find the VM folder in the other datastore as well. Nobody has access to the datastore but me and I am pretty sure that I didn't delete the folder.

The strange thing is that the VM is running and I can access all the services. This VM is running a Content Server and I cannot afford to shut it down. I know that if I shutdown this VM I will not be able to power it back up.

Can anybody help me in this regard? Smiley Happy

15 Replies
mlubinski
Expert
Expert

Go to: Edit Settings, and check on which datastores (and on which folders) are VMDK located.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

[I]If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points[/I]
Reply
0 Kudos
novicesx
Contributor
Contributor

The Edit option gives me the ability to make client settings.

However I came upon an interesting observation. I looked into the VM properties and found out that the path is pointing to another location. I browsed through that folder and I only see .vswp and .vmdk file. I am unable to copy, download or move the vmdk. I guess its because the machine is powered on and I cannot take the risk of shutting down the VM and then create a new vmx and attach the vmdk to it.

I hope this should work out.

Reply
0 Kudos
AgilJosh
Contributor
Contributor

This happened to me too. It seems to indicate that the original files have been deleted or moved. Certainly dont shut down anytime soon as you will not be able to boot. But if the machine is on an accessible network browse to
SERVER\C$ and login with the local admin. This will at least allow you to pull a backup of necessary files before recreating the machine.

Reply
0 Kudos
Chamon
Commander
Commander

You can use the vmkfstools utility from the direct console or CLI to clone the vmdk while it is running to get a backup of the VM before you do anything else to it. Have you looked in the local datastore for the other components of the VM directory?

Reply
0 Kudos
stanj
Enthusiast
Enthusiast

I seem to have a similar probelm - runing ESXi 4.1,

The VM is up but the VMDK and VMX files are missing.

I am logged inot teh linux VM via putty..

I have CLI also,,

What commands do I need to enter via CLI to recreate the VM files and get the VM back as it was...

thanks

Reply
0 Kudos
Chamon
Commander
Commander

Have you checked the local datastore for the missing files? The datastore1.

Reply
0 Kudos
idle-jam
Immortal
Immortal

if you can have a very small windows of downtime, i would suggest doing the above steps or you can rebuild a new VMX file. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=102388...






iDLE-jAM | VCP 2, VCP 3 & VCP 4

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

V12NPro
Contributor
Contributor

Where is this VM stored on? Local datastore or on iSCSI SAN/NAS?

You may want to restart Management Agents on ESXi host containting the VM, more details here

Reply
0 Kudos
mcowger
Immortal
Immortal

You realize this was a 3 month old thread, right? Smiley Happy

--Matt VCDX #52 blog.cowger.us
Reply
0 Kudos
V12NPro
Contributor
Contributor

Matt,

Oh wow Smiley Happy ,didn't realize that but no solutions either. So, I guess its worth replying to?

Reply
0 Kudos
kocheah
Contributor
Contributor

Hi,

Not sure if this is applicable but I just hit this error as well and managed to get it working.

What happened was while the VM was running, I renamed the folder of the VM e.g. from say "abc" to "ABC" (same name but to uppercase), and it didn't like it.

Changed back to the original name and was able to open the console.

Hope it helps.

Cheers.

rogam
Contributor
Contributor

Since this is an old topic. just to share my experience about this kind of issue.

i encountered this kind of problem when my esx server was unable to connect to the storage and datastores.

you may need to check the storage connection.

Reply
0 Kudos
Satchelmouth
Contributor
Contributor

As per what idle-jam said, If you find that you have only a VMDK-flat and a vswp file and if the is still running perfectly fine (although it is unmanageable from vCentre) then this is the correct method to use.  VMware KB: Recreating a missing virtual machine disk (VMDK) descriptor file

I have personally had to use the above method twice and it works perfectly.

The cause of the issue for me was someone performing renames of a VM but at the datastore layer!!

After recreating the VMDK and VMX, a storage vmotion fixed that up and a beating was administered to the user who made the changes.

Reply
0 Kudos
Deepak_Bansal
Contributor
Contributor

Hi

For me both file located in data center but not able to access console of VM .Any idea anyone ?

Reply
0 Kudos
sabyasachijena2
Contributor
Contributor

Hi,

1st Check your Storage, Are your ESX server connected to Storage?

or it's disconnected from Storage.....

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

this error only you will get when your ESX server & Storage will not communicate. (go to Tasks & Events of ESX/VM, you can check...)

Reply
0 Kudos