Remove missing vCenter datastore from OpenNebula

Please, describe the problem here and provide additional information below (if applicable) …

Recently in our VMware cluster, admins have migrated to new datastores deleting the old ones and migrated storage system. This results in the old datastores still being present in Nebula and I am unable to remove them.

Versions of the related components and OS (frontend, hypervisors, VMs):
OpenNebula 5.10.1

Steps to reproduce:

  • Create a datastore in VMware
  • Import this datastore and deploy a few VMs
  • Migrate the VMs with a storage vMotion to new datastores on VMware
  • Delete the old datastores on VMware
  • Attempt to delete the datastores in OpenNebula

Current results:

  • [one.datastore.delete] Cannot delete datastore. Datastore 126 is not empty.
  • I am no longer able to deploy new VMs because the scheduler keeps attempting to monitor datastores that don’t exist in VMware

Expected results:

  • Rediscovery/monitoring of images and moving them to the correct datastores and it deleting the datastore from Nebula

Have you checked there in no images associated to that datastore? Please check “Storage > Images”

Yes! There are actually images in there but these have been storage vMotioned to different datastores. I was hoping nebula’s monitoring would find them in these different datastores. How else are we supposed to do vMotions between datastores?