Migrating from ASM to arm (1): Platform-supported migration services

Source: Internet
Author: User

The arm mode on Azure gives users better management, more new features, and better experiences, so users who are currently using Classic mode (ASM), after understanding and using arm, are also considering how to turn the original ASM mode-based virtual machine, storage, network and other IAAS services to arm mode , this article will introduce the related tools and services.

Currently migrating from ASM to arm, the following tools and services are available:

1. Platform built-in migration services : This service is built-in and only requires you to register resource provider to use it.

The main advantages:

    • No downtime for virtual machines

    • have official support;

Main disadvantages

    • Migration granularity can only be migrated through a vnet or cloud service and cannot be migrated in a customized way, such as a project

    • Virtual machine and storage, network to separate migration, more cumbersome

    • Cross-region, cross-subscription migrations are not supported

2.ASMtoARM Project: PowerShell scripts that support a single virtual machine migration

Website address: Https://github.com/fullscale180/asm2arm

Key Benefits:

    • Automatic generation of ARM templates and PowerShell scripts

    • Flexible combination, support network, NSG, etc.

Main disadvantages:

    • Unable to support multiple virtual machine migrations

    • Time is longer

    • Have downtime (scripts will not help you to shut down the machine)

    • No official support

3. Migaz, a migration tool developed by the Microsoft Services Department

Official website: Https://github.com/Azure/classic-iaas-resourcemanager-migration/tree/master/migaz

Key Benefits:

    • Can be migrated between different subscriptions

    • Customers are free to choose the resources they need to migrate

    • Tools for automating migration storage

    • Allow migration between different regions

Main disadvantages:

    • There is an outage time

    • No official support

You can see that each kind of migration has its advantages and disadvantages, we can choose the appropriate way to migrate according to their own needs; This series focuses on the Azure platform natively supported migration services and Migaz tools for PowerShell-based asmtoarm tools. Everyone is interested to study it yourself.

Platform built-in migration services

Platform built-in migration services, relying on classicinfrastructuremigrate this resource provider, currently in China has been online, can begin to use.

For the migration of the production environment, be very careful, plan and evaluate, and then start the migration. Microsoft's ASM to arm migration, there are some basic methodologies, you can make a reference to ensure that your migration process smooth and smooth:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185545068-234429613. PNG "style=" border:0px; "/>

    • Evaluation – assess whether the virtual machine resides on the VM to meet the migration requirements

    • Start – When the virtual network is ready, you can start preparing for the migration

    • Verify – check and verify that the migrated resources are healthy

    • Submit – Submit a migration request, formally migrate

The user's environment is relatively diverse and complex, such as virtual machines in a vnet, virtual machines not in a vnet, virtual machines with a gateway, and so on, let's first look at how to migrate the most common virtual machines in a virtual network.

Migrating virtual machines in a virtual network to arm

1. First we prepare a test environment, a Linux virtual machine, in a vnet, its storage account is demovmstorage:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185545615-2133912601. PNG "style=" border:0px; "/>

2. Open PowerShell and login to your resource Manager account:

Login-azurermaccount-environmentname Azurechinacloud

3. After the login is completed, you must first register classicinfrastructuremigrate, otherwise the subsequent migration cannot be used:

Register-azurermresourceprovider-providernamespace microsoft.classicinfrastructuremigrate

Check the current Classicinfrastructuremigrate registration status, if you see the status becomes registered, you can do the subsequent operation.

Get-azurermresourceprovider-providernamespace microsoft.classicinfrastructuremigrate

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185546224-1582618390. PNG "style=" border:0px; "/>

4. Use ASM to log in to your current Azure account:

Add-azureaccount-environment Azurechinacloud

Select your source subscription:

Select-azuresubscription-subscriptionid Yoursubid

5. Before you migrate, you need to check your resource manager quotas to make sure you have enough resources to migrate, and if not enough, you need to call 21V 400 to expand your quota

Get-azurermvmusage-location "China East"

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185547068-840242179. PNG "style=" border:0px; "/>

6. Define the virtual network of the virtual machine you want to migrate and verify that there are any issues with migrating the virtual network:

$vnetName = "MyVnet"

Move-azurevirtualnetwork-validate-virtualnetworkname $vnetName

If you see the following output, then it proves that your migration verification is successful:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185547959-879689774. PNG "style=" border:0px; "/>

7. Based on our multi-phase verification operation, you first need to prepare this action before you can commit the operation, first prepare the operation:

Move-azurevirtualnetwork-prepare-virtualnetworkname $vnetName

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185548599-400326009. PNG "style=" border:0px; "/>

8. Then formally submit this operation, after successful operation, to the classic management interface, check the current virtual machine, see has disappeared, this is because the classic portal can only manage Classic mode virtual machine:

Move-azurevirtualnetwork-commit-virtualnetworkname $vnetName

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185549209-57225685. PNG "style=" border:0px; "/>

As you can see, in the Classic mode management interface, the virtual network and the virtual machine are not visible, but the storage account is still in, which means that the virtual machine and the network has been migrated to arm mode, but the storage has not been migrated:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185549771-1022020289. PNG "style=" border:0px; "/>

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185550881-1037418276. PNG "style=" border:0px; "/>

9. Login to the new portal, on the Resource group page, you can see that the system has automatically created two resource groups to the original virtual machine name and virtual network, followed by migrated, if you want all the resources in a resource group, you can manually select the mobile To move all the resources in one resource group to another:

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185551787-922649262. PNG "style=" border:0px; "/>

10. As can be seen from the above description, the storage is actually still retained in the Classic mode, we need to migrate separately, the same steps we can define the storage, prepare the migration, commit the migration:

$storageAccountName = "Demovmstorage"

Move-azurestorageaccount-Prepare -storageaccountname $storageAccountName

Move-azurestorageaccount-Validate -storageaccountname $storageAccountName

Move-azurestorageaccount-Commit -storageaccountname $storageAccountName

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185552912-1406853373. PNG "style=" border:0px; "/>

11. After successful migration, open the new portal interface, check the current New Resource group resource group, you can see the same rules as before, generated a new resource group demovmstorage-migrated, if you want them to put in a resource group, You can also move :

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/845013/201611/845013-20161128185553912-698166706. PNG "style=" border:0px; "/>

As you can see from this article, using the Platform native Migration service, you can easily migrate IaaS resources (virtual machines, networks, storage):

    • Non-disruptive system during migration

    • The system automatically creates resource groups, which are created separately for virtual networks, virtual machines, and storage.

    • All virtual machines in this network can be migrated through a virtual network

    • Storage needs to be migrated separately

    • If required, you need to manually combine multiple migrated resources into one

However, not all IaaS features and configurations are supported, and some configurations and features are not currently supported in the platform-supported migration services, such as:

    • Custom Mirrors for virtual machines

    • Advanced storage virtual machines with boot diagnostics enabled

    • Endpoint access control for virtual networks

    • Virtual Gateway, Traffic Manager configuration file

More scope for migration support can be found in: https://docs.microsoft.com/en-us/azure/virtual-machines/ Virtual-machines-windows-migration-classic-resource-manager


Migrating from ASM to arm (1): Platform-supported migration services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.