Esx find not added vmx files

FireBall
FireBall used Ask the Experts™
on
Our stuff has made a mistake while removing virtual machines , they had bring the vmx files and just removed from the invertory.
We are using cloud nodes and 1 storage with 3HDD on storage.
Is there any way to find vmx directories which is not added to the cluster
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Can you browse the VM folders, on the VMFS datastore, and add the virtual machines back ?

You could run a script, to look for orphaned files, which are not registered with the inventory.
Top Expert 2015

Commented:
PowerGUI plugin for vmware can sort those out fairly quickly

Author

Commented:
is there any command for power gui gheist

we have 400+ vds andrew it is impossible to find one by one
Top Expert 2015

Commented:
Install powergui power pack for vmware (which requires vmware powercli from vmware)
Then look for "orphaned vmdk report"

Alternatively on a single ESXi machine you can SSH and run find / -name *vmdk -mtime +10
i.e look for files named vmdk and not modified recently
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
You can download and install RV Tools from here

http://www.robware.net/

this has a reporting tool for orphaned files, no need for powercli or scripts.

if you want to use powercli see here

I would recommend using the following, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI

http://powergui.org/index.jspa

and

VMware Community Pack

http://www.virtu-al.net/featured-scripts/vmware-powerpack/

You will find the orphaned files script.

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