com_vmware.vcloud.api_presentationservice_InternalServerErrorException: Failed to insert media "<MEDIA_NAME>" into VM "<VM_NAME>" - cannot insert Media [<MEDIA_NAME>] into VM [<VM_NAME>] because the VM's host doesn't have access to the Media's datastore <DATASTORE_NAME>"The issue occurs because the Org VDC Storage Policy is backed by vSAN datastores from multiple, non-mesh-connected vCenter clusters.
VCD, guided by the Storage Policy Tags assigned in vCenter, makes both vSAN datastores available to the Catalog. When a user uploads media, it may be placed on the vSAN datastore of Cluster 2. If the target VM is running on a host in Cluster 1, that host lacks access to the vSAN datastore of Cluster 2, leading to the reported datastore access failure during the media insertion attempt. This misalignment is caused by the incorrect or unnecessary tagging of the secondary vSAN datastore, which VCD then erroneously utilizes.
The resolution is to limit the Org VDC Storage Policy to use only the required vSAN datastore by removing the Storage Policy Tag from the secondary vSAN cluster's datastore in vCenter and forcing a policy refresh in VCD.
Identify the Inaccessible Datastore: Determine which vSAN datastore (e.g., the one in Cluster 2) is hosting the media but is inaccessible to the VM's host (e.g., the host in Cluster 1).
Remove the Tag in vCenter:
Log in to vCenter Server.
Navigate to the vSAN Datastore that you wish to remove from the Org VDC Storage Policy's backing (the one associated with Cluster 2).
Go to Configure -> Tags.
Remove the specific Storage Policy Tag (e.g., vCD-vsan-sp) that VCD is using to map this datastore to the Org VDC Storage Policy.
Refresh Policies in VCD:
Log in to the VCD Provider UI.
Navigate to Resources -> vCenter Servers.
Select the relevant vCenter Server.
Under the Storage Policies tab, select the Refresh Policies action.
Note: This synchronization step forces VCD to recognize the missing tag and remove the corresponding vSAN datastore from the Org VDC's available storage for that Storage Policy.
Verify and Retest: Attempt to insert the media into the VM again. The operation should now succeed as the Org VDC Storage Policy is constrained to the single, accessible vSAN datastore.