I accidentally removed a VM from the Inventory on vCenter. Fortunately, I did not delete the files, so the VM is still on the datastore. How do I put it back to the inventory? I could just rebuild it from scratch and attach the disks, but I do not have the permissions to move files around on the datastore, so it would create a mess.


It's a bit counterintuitive as there is no simple import menu, but the VM can be added back to the inventory. Simply find the VMX file using the Datastore Browser, right click the file and select Add to Inventory.

The corresponding knowledge-base article that describes solution in details https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006160