Seeing "This function should only be called for unmanaged disks" error when attempting migration from Storage Accounts to Managed Disks on Azure
search cancel

Seeing "This function should only be called for unmanaged disks" error when attempting migration from Storage Accounts to Managed Disks on Azure

book

Article ID: 404990

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

Azure has announced that unmanaged disks will no longer be supported starting on September 30th, 2025. After that date, any VMs that have unmanaged disks attached to them will be automatically stopped and will be unlaunchable. Users that have configured the BOSH Director to use storage accounts must migrate to using managed disks before that date.

For more information, see Migrate your Azure unmanaged disks by September 30, 2025.

Customers will be required to follow the instructions in Migrating from Storage Accounts to Managed Disks on Azure prior to September 30th, 2025 to mitigate the impact of the change. 

In the process of the applying the above document, the customer might see the following error when applying change on Ops Manager.

CPI 'attach_disk' method responded with error: CmdError{"type":"Bosh::Clouds::CloudError","message":"This function should only be called for unmanaged disks","ok_to_retry":false}

Resolution

This error occurs when a VM has already been migrated to managed disks, but a new deploy attempt has been made using unmanaged disks instead.

There is no migration path backwards from managed disks to unmanaged disk and you can only migrate forwards from unmanaged disks to managed disks.

To check if bosh is using managed disk:

  1. Download the support bundle
  2. Uncompress support_bundle_SOME_DATE.zip
  3. Check support_bundle_SOME_DATE/deployed_manifest_and_configs/p-bosh-SOME_SHA/manifest_most_recent_SOME_DATE.yml
  4. Look for use_manage_disks, If use_managed_disks is being set to false, then it means the user is trying to switch back to unmanaged disks when the BOSH Director VM has already been migrated to managed disks.

To continue the migration users should:

  • Switch their "Cloud Storage Type" setting back to "Use Managed Disks"
  • Re-enter their storage account for stemcell operations in the "BOSH Storage Account Name" field, or increase the permissions of their client
  • Apply Changes on the BOSH Director
  • Continue the migration procedure as normal