Vsphere 5.5 Searching vmx files

How can i search for vmx files on all datastores in vsphere 5.5. I accidently removed a VM from inventory and have searched through all the datastores so I can add back into the inventory, but cannot find any matching vmx files. The server name may have been renamed after it was created so the vmx file may be under a different name. Is there a way for my to search for vmx files on all the datastores. I will try to add them in one at a time and see if I can get the server I want.

Thanks in advance for your time and assistance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Murali SripadaCommented:
You can use below command from ssh
Find - iname vmname.vmx /
This will search entire directories including data stores.. If the vmname is different, it might be tough but if you remember the host last the vm residing then you can connect via ssh and use below command from log to check the location.. Log under var/run/log
You can use zgrep or grep vmname hostd.*
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Did you DELETE the VM ?

Because if you deleted it, it would be GONE from the datastore!
Antonio02Author Commented:
Thanks Murali, but that did not help.
Thanks Andrew, and I did not delete the VM. Its still out there somewhere.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Murali SripadaCommented:
Have you tried with the other names as you mentioned that the vm is renamed than original?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
How about downloading RV Tools, and looking at the Orphaned Files Tab!


It will show files which are not associated or assigned to the Inventory, you may get some luck

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Antonio02Author Commented:
Thanks Guys, We have decided to not bring these servers online, so I am just going to delete the vmdk files from disk and delete the host names from AD. Appreciate your time and efforts.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.