When trying to toggle elasticity for a flex Organization VDC, "Error: VDC Name is not associated to primary Resource Pool" is shown in the UI.
The Provider VDC backing the Organization VDC has multiple Resource Pools attached.
There are no existing workloads in the Primary Resource Pool.
Similar errors can be found in /opt/vmware/vcloud-director/logs/vcloud-container-info.log or /opt/vmware/vcloud-director/logs/vcloud-container-debug.log
2024-12-23 20:40:10,587 | ERROR | pool-jetty-35 | DefaultExceptionMapper | Internal server exception | requestId=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,request=PUT https://<VCD FQDN>/api/admin/vdc/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,requestTime=1734986410542,remoteAddress=<IP Address>:,userAgent=<UserAgent>...,accept=application/*+json;version 40.0.0-alpha
java.lang.NullPointerException
at com.vmware.vcloud.api.rest.handlers.utils.VdcUtils.prepareFlexVdcForDisablingOfElasticityIfFeasible(VdcUtils.java:1699)
...
VMware Cloud Director 10.6, 10.6.1, 10.5.x
Cloud Director queries for a resource pool that has running VMs when attempting to find the Primary Resource Pool to update in the database.
This will be fixed in a future version of VMware Cloud Director.
Workaround:
Deploy a VM in the Primary Resource Pool and then attempt to toggle Elasticity on the Organization VDC again.