Muokkaa

Jaa


How to migrate your classic storage accounts to Azure Resource Manager

Microsoft will retire classic storage accounts on August 31, 2024. To preserve the data in any classic storage accounts, you must migrate them to the Azure Resource Manager deployment model by that date. After you migrate your account, all of the benefits of the Azure Resource Manager deployment model will be available for that account. For more information about the deployment models, see Resource Manager and classic deployment.

This article describes how to migrate your classic storage accounts to the Azure Resource Manager deployment model. For more information, see Migrate your classic storage accounts to Azure Resource Manager by August 31, 2024.

Overview of the migration process

Before you get started with the migration, read Understand storage account migration from the classic deployment model to Azure Resource Manager for an overview of the process.

To migrate your classic storage accounts, you should:

  1. Identify classic storage accounts in your subscription.
  2. Locate and delete any disk artifacts in classic accounts.
  3. Migrate your classic storage accounts.
  4. Update your applications to use Azure Resource Manager APIs.

Identify classic storage accounts in your subscription

To list classic storage accounts in your subscription with the Azure portal:

  1. Navigate to the list of your storage accounts in the Azure portal.

  2. Select Add filter. In the Filter dialog, set the Filter field to Type and the Operator field to Equals. Then set the Value field to microsoft.classicstorage/storageaccounts.

    Screenshot showing how to list classic storage accounts in Azure portal.

Locate and delete any disk artifacts in a classic account

Classic storage accounts may contain classic (unmanaged) disks, virtual machine images, and operating system (OS) images. To migrate the account, you will need to delete these artifacts first.

Important

If you do not delete classic disk artifacts first, the migration may fail.

To learn about migrating unmanaged disks to managed disks, see Migrating unmanaged disks to managed disks.

To delete disk artifacts from the Azure portal, follow these steps:

  1. Navigate to the Azure portal.

  2. In the Search bar at the top, search for Disks (classic), OS Images (classic), or VM Images (classic) to display classic disk artifacts.

  3. Locate the classic disk artifact to delete, and select it to view its properties.

  4. Select the Delete button to delete the disk artifact.

    Screenshot showing how to delete classic disk artifacts in Azure portal.

For more information about errors that may occur when deleting disk artifacts and how to address them, see Troubleshoot errors when you delete Azure classic storage accounts, containers, or VHDs.

Migrate a classic storage account

The process of migrating a classic storage account involves four steps:

  1. Validate. During the Validation phase, Azure checks the storage account to ensure that it can be migrated.

  2. Prepare. In the Prepare phase, Azure creates a new general-purpose v1 storage account and alerts you to any problems that may have occurred. The new account is created in a new resource group in the same region as your classic account.

    At this point, your classic storage account still exists. If there are any problems reported, you can correct them or abort the process.

  3. Check manually. It's a good idea to make a manual check of the new storage account to make sure that the output is as you expect.

  4. Commit or abort. If you're satisfied that the migration has been successful, then you can commit the migration. Committing the migration permanently deletes the classic storage account.

    If there are any problems with the migration, then you can abort the migration at this point. If you choose to abort, the new resource group and new storage account are deleted. Your classic account remains available. You can address any problems and attempt the migration again.

For more information about the migration process, see Understand storage account migration from the classic deployment model to Azure Resource Manager

Note

Accounts left in a Prepare migration state more 30 days may have their migrations committed on your behalf. If you need more than 30 days to validate your migration to Azure Resource Manager, you can abort the current migration and restart it when you are ready.

You can migrate a classic storage account to the Azure Resource Manager deployment model with the Azure portal or PowerShell.

To migrate a classic storage account to the Azure Resource Manager deployment model with the Azure portal:

  1. Navigate to your classic storage account in the Azure portal.

  2. In the Settings section, select Migrate to ARM.

  3. Select Validate to determine migration feasibility.

    Screenshot showing how to migrate your classic storage account to Azure Resource Manager.

  4. After a successful validation, select Prepare button to simulate the migration.

  5. If the Prepare step completes successfully, you'll see a link to the new resource group. Select that link to navigate to the new resource group. The migrated storage account appears under the Resources tab in the Overview page for the new resource group.

    At this point, you can compare the configuration and data in the classic storage account to the newly migrated storage account. You'll see both in the list of storage accounts in the portal. Both the classic account and the migrated account have the same name.

    Screenshot showing the results of the Prepare step in the Azure portal.

  6. If you're not satisfied with the results of the migration, select Abort to delete the new storage account and resource group. You can then address any problems and try again.

  7. When you're ready to commit, type yes to confirm, then select Commit to complete the migration.

Important

There may be a delay of a few minutes after validation is complete before the Prepare button is enabled.

Update your applications to use Azure Resource Manager APIs

After you migrate your classic storage account to Azure Resource Manager, you must update your applications and scripts to use Azure Resource Manager APIs. The Azure Storage resource provider is the implementation of Azure Resource Manager for Azure Storage.

Azure Storage provides SDKs for convenience in calling the Azure Storage resource provider APIs:

You can also use the latest versions of Azure PowerShell and Azure CLI to manage your migrated storage accounts:

To learn more about resource providers in Azure Resource Manager, see Resource providers and resource types.

See also