I created datastore that located on iSCSI SAN and connect it to three ESXi 6.5 hosts. I deployed VM on this datastore for testing storage performance. Then I've destroyed LUN on SAN and didn't unmount datastore from ESXi hosts. Now my host don't see connected datastore. But datastore and VM exist in vCenter and i can't delete them, only rename or move to folder.
From my understanding, the datastores are removed from host but it is still shown in vcenter inventory, looks like the entries in the vcdb should be removed in order to remove the DS from inventory.
Try the steps given in the following article to remove the entry manually from the vCenter database
Unable to remove a datastore from vCenter Server Inventory - Virtual Barker
else you may have to represent the lun again to esxi hosts mount the datastore again , then remove it as per DS unmounting process.
The datastore will show up as long as there are any references to it. Please check if a VM on this datastore is still registered, or whether e.g. a virtual CD-ROM (ISO image) for any of the existing VMs still points to this datastore.
André
I can't delete VM fro datastore.
That's correct. The datastore doesn't exist anymore, but there seems to be a reference to it. As soon as this reference is removed, the datastore should disappear.
André
From my understanding, the datastores are removed from host but it is still shown in vcenter inventory, looks like the entries in the vcdb should be removed in order to remove the DS from inventory.
Try the steps given in the following article to remove the entry manually from the vCenter database
Unable to remove a datastore from vCenter Server Inventory - Virtual Barker
else you may have to represent the lun again to esxi hosts mount the datastore again , then remove it as per DS unmounting process.
Yes, you are right. the datastores are removed from host but it is still shown in vcenter inventory. But I can't represent the lun again with the same name.
And article http://virtualbarker.com/2014/05/30/unable-remove-datastore-vcenter-server-inventory/ doesn't applicable because I use VCSA (not vcenter + MS SQL DB)
Still you can do it..by accessing postgres database as the schema is same for all types. If you have support contract with VMware, you may contact vmware support for help. Meanwhile, I will check if I can help you with the steps using vcenter lab,
I found article that helped me connect to postgres DB https://thinkvirtualblog.wordpress.com/2015/04/04/how-to-connect-to-vcsavcva-postgres-database/
ok, Thanks!
I always unmount the datastore, then detach the lun from the hosts, and then remove access at the storage system level and it works every time for me.