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 <vSAN-DATASTORE_NAME>"ERROR | Backend-activity-pool-#### | FutureUtil | Unable to insert CD-ROM for VM %s | requestId=######-####-#####-##-######,request=POST https://<VCDFQDN>/api/vdc/######-####-#####-##-######/action/createVm,requestTime=######,remoteAddress=##.##.#.###:9013,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version 39.0 vcd=######-####-#####-##-######,task=######-####-#####-##-###### activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:######-####-#####-##-######) activity=(com.vmware.vcloud.vdc.impl.ComposeRecomposeVAppActivity,urn:uuid:######-####-#####-##-######)com.vmware.vcloud.api.presentation.service.BadRequestException: Failed to insert media ",<ISO_Name>" into VM "<VMName>". at com.vmware.ssdc.backend.services.impl.VmManagerImpl.insertMedia(VmManagerImpl.java:2662)Caused by: com.vmware.ssdc.library.exceptions.MediaNotAccessibleException: Cannot insert Media [<ISO_Name>] into VM <VMName> because the VM's host [<ESXi Host Name] doesn't have access to the Media's datastore [<vSAN-DATASTORE_NAME>]. at com.vmware.vcloud.fabric.storage.media.impl.InsertMediaActivity$InsertMediaPhase.invoke(InsertMediaActivity.java:123) ... 7 more
ERROR | Backend-activity-pool--#### | ComposeRecomposeVAppActivity | [Activity Execution] Uncaught Exception during Activity execution. Recent phase: com.vmware.vcloud.vdc.impl.ComposeRecomposeVAppActivity$DeployVAppPostActionPhase@###### - Handle: urn:uuid:######-####-#####-##-######, Current Phase: ComposeRecomposeVAppActivity$DeployVAppPostActionPhase | requestId=######-####-#####-##-######,request=POST https://<VCDFQDN>/api/vdc/######-####-#####-##-######/action/createVm,requestTime=######,remoteAddress=##.##.#.###:9013,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version 39.0 vcd=######-####-#####-##-######,task=######-####-#####-##-######faa63ab4c2 activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:######-####-#####-##-######) activity=(com.vmware.vcloud.vdc.impl.ComposeRecomposeVAppActivity,urn:uuid:######-####-#####-##-######)java.util.concurrent.ExecutionException: com.vmware.vcloud.api.presentation.service.BadRequestException: Failed to insert media <ISO_Name>" into VM "<VMName>". at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:136) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)Caused by: com.vmware.vcloud.api.presentation.service.BadRequestException: Failed to insert media <ISO_Name>" into VM "<VMName>". at com.vmware.ssdc.backend.services.impl.VmManagerImpl.insertMedia(VmManagerImpl.java:2662) at com.vmware.ssdc.backend.services.impl.VmManagerImpl.insertMedia(VmManagerImpl.java:2579) at jdk.internal.reflect.GeneratedMethodAccessor14706.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:234) at com.sun.proxy.$Proxy330.insertMedia(Unknown Source) at com.vmware.ssdc.backend.services.impl.InsertMediaActivity$InitialPhase.invoke(InsertMediaActivity.java:55) at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175) at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112) ... 5 moreCaused by: com.vmware.ssdc.library.exceptions.MediaNotAccessibleException: Cannot insert Media <ISO_Name>" into VM "<VMName>". because the VM's host [<ESXi Host Name] doesn't have access to the Media's datastore [<vSAN-DATASTORE_NAME>] at com.vmware.vcloud.fabric.storage.media.impl.InsertMediaActivity$InsertMediaPhase.invoke(InsertMediaActivity.java:123) ... 7 more
VMware Cloud Director 10.x
This issue occurs because the specific ESXi host where the Virtual Machine is running (or the host attempting to access the media from the VCD catalog) does not have access to the underlying datastore where the media file (ISO) is located.
To resolve this issue, ensure that the shared datastore where the media files (ISOs) are stored is mounted and accessible by all ESXi hosts within your environment. Note: Broadcom generally recommends using dedicated shared storage solutions (e.g., NFS, iSCSI, Fibre Channel) rather than vSAN for media libraries. These dedicated solutions often provide more straightforward and consistent access control mechanisms across the entire environment, reducing the likelihood of such access-related issues.