Link to home
Start Free TrialLog in
Avatar of Antonio02
Antonio02Flag for United States of America

asked on

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.
Avatar of Murali Sripada
Murali Sripada

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.*
Did you DELETE the VM ?

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

ASKER

Thanks Murali, but that did not help.
Thanks Andrew, and I did not delete the VM. Its still out there somewhere.
SOLUTION
Avatar of Murali Sripada
Murali Sripada

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.