When attempting to deploy or create a new Virtual Machine (VM) within an Organization VDC in VMware Cloud Director (VCD) 10.6.x, the provisioning process fails during instantiation.
The task fails with the following explicit error message routed from vCenter Server:
Underlying system error: No valid hosts could be found due to datastore accessibility. vCenter Server task (moref: task-###### failed in vCenter Server 'VCName' (########-####-####-####-############). - A component of the virtual machine is not accessible on the host
VCD 10.6.x
This issue occurs because the VCD Placement Engine attempts to allocate storage and provision a shadow/target VM onto a local datastore (datastore1) belonging to an ESXi host that is currently residing in Maintenance Mode.
Specifically, during placement selection, VCD attempts to use a storage profile StorageProfile-1 and targets datastore1 (##) (moref: datastore-####). However, because its parent ESXi host ##.##.##.##is in maintenance mode, vCenter Server cannot access the storage components on this localized datastore to complete the creation task.
Log Evidence Analysis:
a) VCD tries to use datastore1 (##)
vcloud-container-debug.log
YYYY-MM-DD hh:mm:ss | INFO | vim-proxy-activity-pool-##### | CreateVmActivity | [Activity Execution] Creating VM drsShellVm-########-####-####-####-############ in resource pool [vcId=########-####-####-####-############, moref=resgroup-####], folder [vcId=########-####-####-####-############, moref=group-v####], datastore "[vcId=########-####-####-####-############, moref=datastore-####]" datastore1 (##), storage profile StorageProfile-1
b) The correspoinding Esxi host is in Maintenance mode:
vcloud-container-debug.log
YYYY-MM-DD hh:mm:ss | DEBUG | Backend-activity-pool-###### | BadHostsFilter | Host [##.##.##.##, [vcId=########-####-####-####-############, moref=host-####]] is in maintenance mode
If the ESXi host ##.##.##.## must remain in maintenance mode for scheduled hardware/software remediation, move the host out of the vSphere cluster that is managed by Cloud Director. This prevents VCD from selecting its local storage during placement workflows