Trying to deploy a VM from a content library throws a similar error related to a missing datastore:
The provided storage backing Datastore:datastore-XXXX:XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX for library ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ does not exist, the storage backing might be removed, disconnected, or no longer accessible via Datastore:datastore-
XXXX:XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX
.
Running the following poweshell command also shows no datastore listed
Get-ContentLibrary <Content_Library_Name>| Select *
AuthenticationEnabled : False
Published : False
PublishUrl : <Content_Library_publish_URL> Example: https://<VCFQDN>/cls/vcsp/lib/<UUID>/lib.json
PersistJson : False
OptimizeRemotePublishing : False
Type : Local
CreateDate : 3/4/2035:11:41 PM
UpdateDate : 3/4/2024 12:10:41 PM
Description :
SyncDate :
Version : 2
Datastore :
Id : <UUID>
Name : Content_Library_Name
Uid : /VIServer=servername\username@VCFQDN:443/LocalContentLibrary=UUID
vCenter Server 7.x
vCenter Server 8.x
This is likely caused by a datastore that was improperly removed from the vCenter
Rebuilding the Content Library is the best option to fix this error