VMWare vmx file

I am in the process of cleaning up unused VM folders on our SAN.  So I noticed that if a VM was in Inventory, there was not a .vmx file in the Datastore folder for that VM.  I looked through every active VM on three LUN and the same thing applied.

However, every vm that was in the datastore, but not in inventory, had a .vmx file in the datastore folder.

My assumption was that active/in inventory VM's do not have a .vmx file, and not active/not in inventory do.

However, I have some test VM's running on a local store on the host (not on the SAN) and active/in inventory VM's have a .vmx file.  Which blows my assumption out of the water.

Should all VM's have a vmx file, active or not?

Is the a better way to determine if a datastore object is not active and might be deleted?
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.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes, there is a much better method of doing this, so you can see which are orphaned files.

Download and use RV Tools from here


Download, install it, connect to vCenter Server, using your current username and password for vCenter Server.

Click the vDatastores Tab, and it will SCAN all datastores in the inventory, and REPORT all the Orphaned Files.

e.g. vmx, and vmdks which are not associated with any VMs, or Inventory items.

If you've never run this, you may have a few files listed.

 RVTools, vDatastores shows Orphaned Files

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
sfletcher1959VPAuthor Commented:
Love this tool
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
It's very good for FREE!
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.