Error: "error instantiating a new VM: API Error: 400: VDC Compute Policy VM_PLACEMENT_POLICY_NAME is not available in VDC ORG_VDC_NAME" causes TKG cluster creation to fail
search cancel

Error: "error instantiating a new VM: API Error: 400: VDC Compute Policy VM_PLACEMENT_POLICY_NAME is not available in VDC ORG_VDC_NAME" causes TKG cluster creation to fail

book

Article ID: 325499

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Attempting to create a Tanzu Kubernetes Grid (TKG) cluster fails in Cloud Director through Container Service Extension.
  • The vApp and initial Ephemeral VM for the TKG cluster are created but the first Control Plane node or Worker node VM is never created.
  • A VM Placement Policy is selected for the Control Plane and/or Worker nodes during TKG cluster creation.
  • In the Kubernetes Container Clusters plug-in, the Events tab of the TKG cluster which failed creation shows an event of the form:

    Event Details
    Name:    VcdMachineCreationError
    Type:    Error
    Time:    <EVENT_TIME>
    Resource Name:    <TKG_CLUSTER_VM_NAME>
    error:    error for adding TKG VM to vApp[<TKG_CLUSTER_NAME>]: [unable to issue call to create VMs with prefix [<TKG_CLUSTER_VM_NAME>] in vApp [<TKG_CLUSTER_NAME>] with template [<CATALOG_NAME>/<TEMPLATE_NAME>]: [unable to issue call to create VM [<TKG_CLUSTER_VM_NAME>] in vApp [<TKG_CLUSTER_NAME>] with template [<CATALOG_NAME>/<TEMPLATE_NAME>]: [error instantiating a new VM: API Error: 400: VDC Compute Policy <VM_PLACEMENT_POLICY_NAME> is not available in VDC <ORG_VDC>.]]]

  • The Cluster API Provider for VMware Cloud Director (CAPVCD) logs on the Ephemeral VM show an error adding the VMs to the vApp for the TKG cluster using the Cloud Director action/recomposeVApp API:
error instantiating a new VM: API Error: 400: VDC Compute Policy <VM_PLACEMENT_POLICY_NAME> is not available in VDC <ORG_VDC>
  • Creating VMs in the Cloud Director UI or API succeeds when using the same VM Placement Policy, in the same Organization VDC, as the same user attempting to create the TKG cluster.


Environment

  • VMware Cloud Director 10.6.x
  • VMware Cloud Director Container Service Extension 4.2.3

Cause

This is a known issue affecting Container Server Extension deployments configured to use Cluster API Provider for VMware Cloud Director (CAPVCD) v1.3.2 or earlier when multiple VM Placement Policies with the same name exist in the Cloud Director instance.

Resolution

This issue is under review by VMware Cloud Director Engineering.

Subscribe to this knowledge article to get updates on this issue.

Workaround:

To workaround the issue ensure that all VM Placement Policies in Cloud Director have unique names if they are to be used for TKG cluster creation or alternatively do not select any Placement Policy for Control Plane or Worker Pools during the TKG Cluster creation.
The name of an existing VM Placement Policy can be edited as per the Cloud Director documentation here, Edit a VM Placement Policy in VMware Cloud Director.

Additional Information

For information on how to generate logs from Container Service Extension and an Ephemeral VM (Bootstrap VM) see the documentation, Troubleshooting - Log Analysis from Bootstrap VM.