Error: "CPI 'attach_disk' method responded with error" returned when using 'bosh create-env' command
book
Article ID: 380255
calendar_today
Updated On:
Products
VMware Tanzu Kubernetes Grid Integrated (TKGi)
Issue/Introduction
The 'bosh create-env' command doesn't take existing disk location into consideration when creating a new Bosh VM.
This is specifically true when the AvailabilityZone has multiple Clusters with different storage.
'bosh deploy' or 'bosh recreate' commands place the VM in the same cluster as the existing disk location. This only impacts the 'bosh create-env' command.
The newly deployed Bosh VM might be dislocated from its existing persistent disk if it resides on another cluster when running the create-env command.
The following error message will be returned:
CPI 'attach_disk' method responded with error: CmdError{"type":"Unknown","message":"Unable to attach disk to the VM. There is no datastore matching pattern or required space available for disk to move","ok_to_retry":false}
Environment
This issue present in the Bosh CLI prior to versions 7.8.1.
Bosh deployments that have AZ's with multiple clusters using different storage.
Cause
This is caused by the 'bosh create-env' command not passing along the disk CID's in prior versions of the CLI. See Github issue 664 for Bosh CLI for details
Resolution
This has been resolved in Bosh CLI v7.8.1. The release can be downloaded here