Apply Changes fails with "CPI 'delete_stemcell' method responded with error: CmdError{"type":"Bosh::Clouds::CloudError","message":"could not find AMI"
book
Article ID: 375297
calendar_today
Updated On:
Products
VMware Tanzu Application Service
Issue/Introduction
When attempting to Apply Changes, it fails with an error like below:
Deleting stemcell from cloud:
CPI 'delete_stemcell' method responded with error: CmdError{"type":"Bosh::Clouds::CloudError","message":"could not find AMI 'ami-xxxxx'","ok_to_retry":false}
This is usually seen when attempting to create a new BOSH Director VM.
Environment
This is seen in AWS based environments.
Resolution
To resolve this:
First, check on AWS and verify that the AMI mentioned in the error message is no longer present.
Once you are sure that it has been removed, first back up the bosh-state.json file in the /var/tempest/workspaces/default/deployments on the Ops Manager VM.
Once backed up somewhere, open the original bosh-state.json file
Delete the details regarding this AMI under the "stemcells" section.
Once this has been deleted, the next apply changes should succeed.
If you are unsure about any of this, please open a case with Tanzu support.