Apply Changes fails with "CPI 'delete_stemcell' method responded with error: CmdError{"type":"Bosh::Clouds::CloudError","message":"could not find AMI"
search cancel

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:

  1. First, check on AWS and verify that the AMI mentioned in the error message is no longer present. 
  2. 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. 
  3. Once backed up somewhere, open the original bosh-state.json file
  4. Delete the details regarding this AMI under the "stemcells" section.
  5. 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.