Every now and then, I get "orphaned" vms. And they even completely disappeared form the esxi hosts.
Why ?
I read many posts about this, but nothing useful.
What's the correct way to fix this with VCSA 6.5 ?
You will need to find out why you are getting orphaned VM's. There is a KB article what common errors that relate to orphaned VM's. Virtual machines appear as invalid or orphaned in vCenter Server (1003742) | VMware KB
Maybe this can help you find the cause?
This article is not useful for 6.5.
For example, those commands does not work anymore with 6.5 :
service mgmt-vmware restart
service vmware-vpxa restart
I know, in the article different reasons for having orphaned vm's are described. I thought you could use them to identify why you are having these.
Any issue on datastore, where these vms reside ?. There might be reason unavailable of datastore to reach for the ESXi host, where the vm is running.