Azure ASM to ARM cloud services Migration Commands

Recently I was consulting for an Enterprise customer that wanted to move a number of their resources from Classic to Resource manager portal.
This is the migration path & step by step process that I followed
My previous post that explains the step by step process 
Mircosoft link that has some steps missing

Below are a list of Azure cloud services Migration commands that is used to migrate cloud services / VM’s from classic to resource manager portal

Login to Azure ARM Portal

Select Azure ARM Subscription where the VNET resides
Select-AzureRmSubscription -SubscriptionId “put your subscription id here”

Login to Azure ASM portal

Select Azure ASM Subscription where the VNET resides
Select-AzureSubscription -SubscriptionId “put your subscription id here”

Register for the migration services provider
Register-AzureRmProviderFeature -FeatureName ClassicInfrastructureMigrate -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

$serviceName = “cloudservice”
$deployment = Get-AzureDeployment -ServiceName $serviceName
$deploymentName = $deployment.DeploymentName

2. Validate the environment:
Move-AzureService -Validate -ServiceName $serviceName -DeploymentName $deploymentName -UseExistingVirtualNetwork -VirtualNetworkResourceGroupName “rgname” -VirtualNetworkName “vnetname” -SubnetName “subnetname” -Debug

3. Prepare the environment:
Move-AzureService -Prepare -ServiceName $serviceName -DeploymentName $deploymentName -UseExistingVirtualNetwork -VirtualNetworkResourceGroupName “rgname” -VirtualNetworkName “vnetname” -SubnetName “subnetname” -Debug

4. Commit the operation:4. Commit the operation: Move-AzureService -Commit -ServiceName $serviceName -DeploymentName $deploymentName

My previous post talks about how to migrate azure VM from ASM to ARM

3 Responses to Azure ASM to ARM cloud services Migration Commands

  1. […] next post talks about a list of cloud services migration command that is used for moving cloud services from […]

  2. Vipul Diwan says:

    How to migrate cloud service from one subscription (ASM) to another subscription (ARM), without moving existing resources.

  3. kavinilavan velmurugan says:


    Can you please share the script to migrate “web applications” and “SaaS based SQL databases” from asm to arm

    Kavinilavan Velmurugan

Leave a Reply

Your email address will not be published. Required fields are marked *