Vsphere 5.5 Searching vmx files

Antonio02
Antonio02 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Murali SripadaVMware Engineer | vExpert 18/19
Distinguished Expert 2018

Commented:
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 Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Did you DELETE the VM ?

Because if you deleted it, it would be GONE from the datastore!

Author

Commented:
Thanks Murali, but that did not help.
Thanks Andrew, and I did not delete the VM. Its still out there somewhere.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Murali SripadaVMware Engineer | vExpert 18/19
Distinguished Expert 2018
Commented:
Have you tried with the other names as you mentioned that the vm is renamed than original?
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
How about downloading RV Tools, and looking at the Orphaned Files Tab!

https://www.robware.net/rvtools/

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

Author

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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial