After adding an USB controller to a running VM, the VM crashed. In vShpere the VM was marked as (invalid).

After some Googling I removed the VM from the inventory, tried to readd the VM, but the option is grayed out. Then I tried to delete the VM from the datastore because this was a test machine I could restore. However I am unable to do so and get "Can not delete file"-errors.

On the datastore the VM still seems to be running: a lock and the vram files are still there and I am able to ping the VM...

link to screenshot

If I run Get-VM the machine does not popup on the list...

Any suggestion that help me add the machine back to the inventory or remove the MV are appreciated.


Enable SSH on the host. Log on via ssh and use esxcli to find the World ID of your VM and kill it:

esxcli vm process list
esxcli vm process kill --type=hard --world-id=????

If --type=hard is not sufficient you can try --type=force as a last resort. If this doesn't work you will have to reboot the host to kill the VM.

Afterwards you should be able to remove everything via the web interface. You can also directly delete the files from the command line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.