Migrating (or using) old VHD on a Classic Storage

2019-07-29 11:57发布

I find the storage options confusing so far. It seems like I can have a disk as a VHD (stored as a "Page Blob") on a Storage Account (Classic or New) or I can create a "Disk" directly. I'm not sure what the benefits of each option are.

My problem is that I had an old Classic VM that had a data disk stored as a VHD (page blob) on a Classic Storage Account. I created a new VM now (not classic) and I want to attach that same VHD, but I don't see any way to do so. If I click create new data "Disk" then I have an option to copy a snapshot but I cannot see any snapshots from my old Classic Storage Account, I am able to see snapshots from my new Storage Accounts though, so I thought I need to migrate.

I found this answer on SO which suggests that it's possible to migrate using Powershell, by following instructions on this page.

Based on those instructions, I executed the following commands:

Connect-AzureRmAccount
Select-AzureRmSubscription –SubscriptionName "Visual Studio Premium with MSDN"  
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate // wait 5 minutes till it registers
Add-AzureAccount
Select-AzureSubscription –SubscriptionName "Visual Studio Premium with MSDN"
$storageAccountName = "<Name of Classic Storage Account>"
Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName // validation passes
Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName // throws an an exception:

Move-AzureStorageAccount : InternalError : The server encountered an internal error. Please retry the request.
At line:1 char:5
+     Move-AzureStorageAccount -Prepare -StorageAccountName $storageAcc ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Move-AzureStorageAccount], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.StorageServices.MoveStorageAccountComm
   and

So, how should I proceed? My goal is to get my old VHD with my data working with the new VM. Ideally, I'd like to migrate it to the new model (whichever it is).

0条回答
登录 后发表回答