VMware Cloud Community
abaum
Hot Shot
Hot Shot
Jump to solution

Missing VMX file. Where did it go?

All - I have a guest running that is missing all its files except the vmdks. How can it still be running? More importantly...where did the missing files go?

adam

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal
Jump to solution

sounds to me you were right in someone was messing with that particular guest. Glad to see you got it resolved

Wish i could have been more help

Can you mark the thread as answered and award points in you feel anything was helpful

View solution in original post

Reply
0 Kudos
11 Replies
IB_IT
Expert
Expert
Jump to solution

have a look in your datastore...it could be in another folder name. For ex, if your server is named serverA, and your vmdk files are in the folder serverA on the datastore, then maybe this server was recreated at some point and would be in a similar folder called serverA_1...

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

.... also, you can check the host in which the VM says its registered on by going to the service console and typing

vmware-cmd -l

This will give you a listing of all your .vmx files and their paths.

Message was edited by: Troy Clavell

fixed typos

Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

Nope..looked in all my datastores. No where to be found.

Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

Ran vmware-cmd -l and it reported back the directory where I expected the vmx to be. All that's in there are two vmdks and the swap file. I've even su'd to root and looked for hidden files. Not in there.

adam

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

if vmware-cmd -l is seeing everything, this just may be a vCenter issue. Have you tried to restart hostd or the vpx agent on the guests Host?

service vmware-vpxa restart

service mgmt-vmware resart

Finally, you could try restarting the vCenter service, rescanning your storage adapters, or right clicking on the datastore and choosing refresh.

Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

I must be misunderstanding you. After running the vmware-cmd -l, I went to the directory that it thinks has all the files. There are only three files in that directory: two vmdks and the swap file. How could VC be involved? Does vmware-cmd query VC? I am not using VC to browse the datastores. I'm SSHing into the hosts directly.

adam

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

so you are ssh'd into the ESX host and are in the /vmfs/volumes/datastorename/VMfoldername directory and you can't see the .vmx file? If you do a ls-l, it doesn't show you the .vmx?

I assumed incorrectly you were browsing the datastores via the VIC. What happens if you "edit settings" of the VM with the VIC? What does it say under the Options Tab--General- "Virtual Machine Configuration File"?

Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

Yes. Even when I SSH to the appropriate directory, it's not there. Everything in VC points to the directory that I would expect to find it in.

Here's some late-breaking news: One of my cohorts just fessed up to attempting to delete a guest today, but he got a "file in use" type error. Now I am wondering if he tried to delete a powered on guest or if he tried to delete a guest that somehow had a vmdk in my guest's directory. The only other thing I can think of is that he may have tried to delete the guest using the datastore browser and selected the wrong directory.

Even if my cohort managed to delete it, should the guest still be able to run? I guess you really don't need a vmx once you are up and runnning so it is theoretically possible. Just don't reboot Smiley Happy

adam

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

please keep me posted on what the resolution is. I mean worse case, you have to reboot the VM in question that is missing it's .vmx, it errors, atleast you still have all the data in tact. You could always create a custom VM and point that VM to the .vmdk files, which would create you a now "working" VM

Good Luck!

Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

I ended up having to do a restore. Since I use vRanger and it's was a small guest, it only took about 20 minutes.

Here's something wierd. I tried to just create a new guest and use the existing vmdk files, but VC was unable to see them when I searched for them. Turns out only the *-flat.vmdk files were left. I noticed it earlier but didn't think anything of it. So....if a guest is running, it seems that only the *-flat.vmdk files are all that is needed to keep it running. Once I powered it off, I could no longer power it on (no vmx).

adam

Reply
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

sounds to me you were right in someone was messing with that particular guest. Glad to see you got it resolved

Wish i could have been more help

Can you mark the thread as answered and award points in you feel anything was helpful

Reply
0 Kudos