Migrating from Azure Service Manager (ASM) Virtual Machines to Azure Resource Manager (ARM) VM

Time is up. With the announcement of https://manage.windowsazure.com is no more available since 2nd April 2018, it is high time you think around your classic Azure (ASM) resources. Most of the classic services can be managed from new portal i.e., https://portal.azure.com

Here we will consider classic Virtual Machines with Virtual Networks. This is simple because if you move the Classic Virtual Networks to ARM Virtual Networks.

There is an excellent article I followed and it just worked for me /en-us/azure/virtual-machines/windows/migration-classic-resource-manager-ps

This article would consider PowerShell usage. I am assuming that you have Azure PowerShell configured in your laptop.

Step 1: Login and prepare the PowerShell

Login to your Azure Subscription and check if the selected subscription is where you are working.

Then register the Classic Infa Migration component.

Register-AzureRmResourceProvider
-ProviderNamespace
Microsoft.ClassicInfrastructureMigrate

 

This would take some (5-10 min) time. Check the status by running below command,

Get-AzureRmResourceProvider
-ProviderNamespace
Microsoft.ClassicInfrastructureMigrate

 

The status should be "registered". Wait till the status is "registered" before you proceed for the next steps.

Step 2: Identifying Classic Virtual Network name

Finding Classic Virtual Network name is tricky, in new portal is shows something which is not usable. If you open the Classic Virtual Network it shows a section as "Virtual network site name (for .cscfg file)" (as below),

Alternatively, you can also run the below command to find the name of the classic VNet,

Get-AzureVnetSite
|
Select
-Property
Name

 

Step 3: Virtual Network Movement: Identify, Validate, Prepare and Commit

Identify:

Use this name as your VNet name.

$vnetName
=
"Group ASM-ARM ASM-ARM"

 

Validate:

To validate if there is any issue please use this command,

Move-AzureVirtualNetwork
-Validate
-VirtualNetworkName
$vnetName

 

If everything is fine then you can proceed with the next step. Else you need to investigate the message.

Prepare:

Then prepare the VNet

Move-AzureVirtualNetwork
-Prepare
-VirtualNetworkName
$vnetName

 

Commit:

If everything is fine above, then commit, else you can use the -Abort switch.

Move-AzureVirtualNetwork
-Commit
-VirtualNetworkName
$vnetName

 

This ideally should move your resources from ASM to ARM. However, I have observed they creates separate Resource groups. You may later move them into a single resource group.

Namoskar!!!