迁移(或使用)经典存储帐户上的旧VHD以与新(非经典)VM一起使用

时间:2018-09-08 23:23:52

标签: azure powershell azure-storage azure-storage-blobs

到目前为止,我发现存储选项令人困惑。好像我可以在存储帐户(传统或新建)上将磁盘作为VHD(存储为“页面Blob”),也可以直接创建“磁盘”。我不确定每种选择的好处是什么。

我的问题是我有一个旧的Classic VM,该VM的数据磁盘以VHD(页面Blob)的形式存储在Classic Storage Account中。我现在创建了一个新的VM(不是经典的),并且我想附加相同的VHD,但是我看不到任何方法。如果单击“创建新数据”磁盘”,则可以选择复制快照,但是我无法从旧的经典存储帐户中看到任何快照,但是我可以从新的存储帐户中看到快照,所以我认为我需要迁移。

我在SO上发现了此answer,这表明可以通过遵循此page上的说明使用Powershell进行迁移。

根据这些指令,我执行了以下命令:

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

那么,我应该如何进行?我的目标是使我的旧VHD的数据与新VM一起使用。理想情况下,我想将其迁移到新模型(无论是哪种模型)。

0 个答案:

没有答案
相关问题