Deployment Failure when using C2 Machine Types with Local SSDs on GCP
search cancel

Deployment Failure when using C2 Machine Types with Local SSDs on GCP

book

Article ID: 438280

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

When configuring a Tanzu tile (such as Tanzu Application Service or Tanzu Kubernetes Grid) to use C2 machine types (e.g., c2-standard-16) on Google Cloud Platform, the BOSH deployment fails during the create_vm phase with the following error:

L Error: CPI error 'Bosh::Clouds::VMCreationFailed' with message 'VM failed to create: googleapi: Error 400: Number of local SSDs for an instance of type c2-standard-16 should be one of [0, 2, 4, 8], while [1] is requested., badRequest'

Cause

The issue stems from a mismatch between GCP's hardware requirements and the BOSH Google Cloud CPI (Cloud Provider Interface) logic:

  1. GCP Constraint: Unlike N1 instances, certain machine families like C2 and N2 require Local SSDs to be attached in specific quantities (usually multiples of 2 or 4). For a c2-standard-16, GCP rejects a request for a single (1) Local SSD.

  2. CPI Limitation: While the BOSH Google CPI was updated to handle even-numbered Local SSD requirements for N2/N2D instances, the logic was not extended to include the C2 family. By default, the CPI often attempts to request a single Local SSD if the disk configuration is enabled, which triggers the GCP API validation error.

Resolution

The most immediate fix is to use the N1 or N2 machine families for your Tanzu Tile resources.

  • N1-standard-16 allows for a single Local SSD.

  • N2-standard-16 is supported by recent versions of the Google CPI to handle the even-number requirement.