Adventures in custom software and technology implementation.

There has been much discussion as of late relating to the changes in Azure and the eventual need to migrate Azure resources and VMs to that new model. I can understand the confusion if you have not heard of this change. I imagine that you have seen the “Check out the new portal” button at the top of the Azure management page.

Azure - New Resource Model

Keep in mind, this is not only a new portal experience, it is an entirely new model for Azure resources and is the long term model going forward. The new model is the Azure Resource Management (ARM) model (more here Azure Resource Manager Overview). Azure classic model, also known as Azure Service Management (ASM), is being deprecated. As a result, Azure users are being asked to deploy new resources in the newer model, whether those resources are virtual machines, applications, or storage resources.

Considering Migration - ASM to ARM

This poses a problem for users that already have resources created within the classic model.

What will become of those resources?

Microsoft has a plan for the eventual migration of those resources for users that are in that predicament, but for those who are actively using Azure and are wishing to increase there resources within a given environment there is the dilemma of:

Do I create these new resources in the classic model and wait for this “migration” from Microsoft, or move the resources over before expansion of the my environment?

Azure ASM to ARM Tooling

There are some very effective tools that have been developed to assist with these types of migrations, and this blog will depict how to utilize for our efforts:

Azure ASM2ARM Usage - PreRequisites

The primary use of the ASM2ARM script is to provide the ability to move a single VM from the ASM model to the ARM model. There is attention to capture the virtual network settings and bring those over with the VM when the script is executed.

Previous to running the script there are a number of items that are required:

Caveats: VMs cannot be in Affinity groups, they must be regionally located, i.e. West US, East US, etc.

Install PowerShell 5.0 Production Preview or greater is a requirement for the script

To execute PowerShell cmdlets you will need the Microsoft Azure PowerShell module. See Microsoft Azure Downloads to download the module.

In ARM

Create a resource group

Create a storage account within the resource group

If the VMs are configured with a virtual network:

Create a virtual network within the resource group with the same name as the virtual network they exist in on the ASM environment and append "arm" to the end of the name, (ex. vnet1 is named vnet1arm)

Create identical subnets as they exist within the new virtual network

Know the login credentials for the VMs being moved

Launch PowerShell ISE as Administrator

Azure ASM2ARM Usage - Execution

Connect to your Azure accounts and set the subscriptions that you will use as default

Upon completion of the migration test that you can access the VM via RDP.

Run Migration Script - 2nd Server, or additional Servers

For the second VM the settings are already in place so the only thing to change is the Cloud Service name and VM name and change the –DiskAction to NewDisk so that a new VHD file will be used and settings will not be duplicated against the already created configuration.

John

I am getting the following error after entering in the name of my Storage Group. ANy ideas?

cmdlet New-AzureSmToRMDeployment at command pipeline position 1Supply values for the following parameters:StorageAccountName: dropsly1WARNING: The output object type of this cmdlet will be modified in a future release.VERBOSE: Setting up a new deployment 'grumpsly_grumpsly' in the resource group 'dropsly1' using templateC:\templates\grumpsly-grumpsly-setup-160501-1149.jsonNew-AzureRmResourceGroupDeployment : Cannot validate argument on parameter 'location'. The argument "Southeast Asia"does not belong to the set "East US,West US,West Europe,East Asia,South East Asia,East US 2,Central US,South CentralUS,North Europe,Japan East,Japan West,North Central US" specified by the ValidateSet attribute. Supply an argumentthat is in the set and then try the command again.At C:\Users\John\Desktop\asm2arm-master\asm2arm.psm1:701 char:195+ ... eName -TemplateParameterFile $ParametersFileName -Location $Location+ ~~~~~~~~~ + CategoryInfo : InvalidData: ( [New-AzureRmResourceGroupDeployment], ParameterBindingValidationExcepti on + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Azure.Commands.Resources.NewAzureResourceGrou pDeploymentCommand

Josh@Phidiax

Hello John, I appears that you have a syntax error in the name of the region that you are trying to pass through the script. "Southeast Asia" needs to be changed to "South East Asia". Let me know how it goes!