Cant delete disk from vmware vms

The datastores that the disk came from were deleted but the disk were not removed from the vms first. So now the disk still show on the vms but when trying to delete them, it gives an error about invalid configuration for device 0..

How can I remove these disk from the vms?
Who is Participating?
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:
Stop the VMs,

Remove VMs from Inventory.

Edit the VMX files. Remove Disk references.

Add to Inventory.

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
vmichAuthor Commented:
So there are other disk on these vms but your saying once I remove them from inventoryI should be able to delete the disk references?
I guess this is the only way to get rid of these disk?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
the disks have already gone, they do not exist ?

what's left are pointers in the VMX file (configuration), and when you try and edit them, the config is checked, and because the disks are gone, you get an error.

BECAUSE usually, one deletes the entire VM or Disks first before removing a DATASTORE!

You have to manually EDIT the VMX file.
vmichAuthor Commented:
I know someone deleted the datastore before I could delete the disk and I am very angry about that..
vmichAuthor Commented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.