Migracja z Modelu Klasycznego do Azure Resource Manager / Migration from the Classic Model to Azure Resource Manager
Mimo, iż Azure Resource Manager ma już ładnych kilka lat – zdarza się, iż zastajemy Subskrybcje, gdzie usługi wdrożone są w modelu Classic.
Poniższe kroki migrują Storage Account z Modelu klasycznego do ARM.
Login-AzureRmAccount
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate #Wait for registered
Add-AzureAccount
Get-AzureSubscription
Select-AzureSubscription -SubscriptionId “subscription id”
Get-AzureStorageAccount
$storageAccountName=”imagesmf”
$validate=Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName -Verbose
$validate
$validate.ValidationMessages
Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName
Move-AzureStorageAccount -Commit -StorageAccountName $storageAccountName #-Abort will cancel operation
Po migracji zasoby będą w Resource Group z suffixem -Migrated. A operacja ta jest niezbędna jeżeli chcemy migrować zasoby z jednej subskrypcji do innej.
Migration from the Classic Model to Azure Resource Manager
Everyone use Azure Resource Manager for several years, but it happens that some resources are still implemented in the Classic model. The following steps migrate the Storage Account from the Classic Model to ARM.
Login-AzureRmAccount
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate #Wait for registered
Add-AzureAccount
Get-AzureSubscription
Select-AzureSubscription -SubscriptionId “subscription id”
Get-AzureStorageAccount
$storageAccountName=”imagesmf”
$validate=Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName -Verbose
$validate
$validate.ValidationMessages
Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName
Move-AzureStorageAccount -Commit -StorageAccountName $storageAccountName #-Abort will cancel operation
After migration, the resources will be in the Resource Group with suffix -Migrated. And this operation is necessary if we want to migrate resources from one Subscription to another.