My ESX host is managed by a vCenter. I am trying to delete a VM from the ESX host. Actually, I tried 2 approaches. I called destroy_Task() on the VM. I also tried a different approach of removing the VM from the inventory (UnregisterVM) and then physically deleting the VM folder using DeleteDatastoreFile_Task call. In both approaches, it completely clears the VM from ESX host. However, the VM still shows up in the vCenter in orphaned state.
I only have credentials to connect and operate at the ESX host level. I am wondering if there is any way by which it also clears the VM from vCenter apart from removing it from ESX host.
Thanks,
Gowrisankaran