How to migrate resources that have been deployed in ASM to arm

Source: Internet
Author: User

Readers who have used Azure know that Azure offers two management portals to customers, one ASM and one arm, although Azure officially does not announce the elimination of ASM, two portals may coexist for a long time, but given the additional capabilities that ARM offers, Only a very small part of the work will be used to complete the PowerShell, so I recommend that we try to use arm, but for those who have used ASM as a production environment users want to move to arm, should do, today I like you introduce how to move cloud resources from ASM to arm!!!

Let's start by introducing some of the services and tools that you can now use for migration

1. The platform built-in migration service, only need you to register resource provider can use

Features: No downtime during virtual machine migration

Have official support and guarantee

Migration granularity cannot be customized, cannot select an application, System, or project to migrate and can only be migrated as a cloud service or virtual network unit

During the migration, VMS and vnets and storage accounts can only be migrated one by one, not the overall migration

Migrations cannot span data centers and can only be migrated under the same subscription

2.ASMtoARM Project: PowerShell scripts that support a single virtual machine migration can be downloaded at the website address

Features: PowerShell scripts and arm templates can be generated automatically

Flexible freedom to combine, support network, NSG, etc.

You cannot migrate multiple virtual machine migrations at one time

Longer migration process

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

No official support and guarantee

3.MigAZ, the Migration Tool was developed by Microsoft's service department

Features: Can be migrated between different subscriptions

Customers are free to choose the resources they need to migrate

Tools for automating migration storage

Allow migrations between different regions

There is an outage time

No official support and guarantee

From the above comparison can be seen, the characteristics of each migration mode is not the same, the reader can choose according to their own needs, the author of this blog post focuses on method one, follow-up will introduce methods three

Here, I think it is necessary to remind everyone, here the author is only in the migration of simple test environment, the author just show the methodology, for the formal production environment, we must be very cautious in the migration, it is best to do the following preparatory work

Evaluation --Assess whether virtual machines are located in a virtualized network to meet migration requirements

start --The virtual network is ready to start the migration

Verify -check and verify that the migrated resources are healthy

Submit --Submit a migration request, a formal migration

The first step is to create a virtual machine in ASM, storage account, virtual network, cloud service, process omitted, the result is as follows

Cloud Services

Storage Account

Virtual network

Virtual machines

Second step, use PowerShell to login to arm account

PS C:\Users\ sheep > Login-azurermaccount-environmentname azurechinacloud

Enter your account password to complete the login

Register Classicinfrastructuremigrate, otherwise the subsequent migration cannot be used

PS C:\Users\ sheep > Register-azurermresourceprovider-providernamespace microsoft.classicinfrastructuremigrate

Registration time will be about one minute, after the registration is completed enter the following command to observe the registration results

PS C:\Users\ sheep > Get-azurermresourceprovider-providernamespace microsoft.classicinfrastructuremigrate

Login to current account using ASM

PS C:\Users\ sheep > Add-azureaccount-environment azurechinacloud

Enter your account and password to complete the login

Select your source Subscription

PS C:\Users\ sheep > Select-azuresubscription-subscriptionid xxxxxxxx

Before migrating, check your resource manager quotas to make sure you have enough resources to migrate

" China East "

Define the virtual network to which you want to migrate the virtual machine and verify that there are any issues with migrating the virtual network

" asmvnet " PS C:\Users\ sheep sheep > Move-azurevirtualnetwork-validate-virtualnetworkname $vnetName

See the following results indicate success

Based on our multi-stage verification operations, which means that each operation must be validated before it is manipulated

PS C:\Users\ Sheep sheep > Move-azurevirtualnetwork-prepare-virtualnetworkname $vnetName

See the following results indicate success

You can then submit a formal operation.

PS C:\Users\ Sheep sheep > Move-azurevirtualnetwork-commit-virtualnetworkname $vnetName

See the following results indicate success

Now that we go back to the ASM portal and see the results, one strange thing is that the virtual network is gone, but the storage account is still

You can see that the ASMVM created at the beginning is gone.

The asmvnet, which was created at the beginning, is gone.

In fact, there is no cloud service.

This is because virtual machines and virtual networks have been migrated into arm, so it is not visible in ASM, but the storage is still

Next, we landed in the arm portal, found two more resource groups, and with the original virtual machine name and virtual network name after adding migrated, if you want all resources in a resource group, you can manually select move to move resources in one resource group to another resource group

We found that the resources that were originally in ASM were migrated to arm.

For storage, we need to migrate separately, all the same steps, define storage, prepare for migration, commit migration

" Asmstorage " PS C:\Users\ Sheep > Move-azurestorageaccount-prepare-storageaccountname $storageAccountNamePS C:\Users \ goat > Move-azurestorageaccount-validate-storageaccountname $storageAccountNamePS C:\Users\ sheep > Move-azurestorageaccount-commit-storageaccountname $storageAccountName

The results are as follows

Returning to the ASM portal to observe the results, you will find that the Asmstorage storage that was created at the beginning is not visible.

Return to the ARM portal to observe the results, found a more resource group, you can also manually move it to the resource group just inside.

The final result is as follows

According to the POC process, we can see that using the platform built-in migration services, there are several features

The ability to easily migrate IaaS resources

The migration process system will not be interrupted

You can migrate virtual machines in this virtual network by migrating the virtual network

Storage needs to be migrated separately

If necessary, you can combine multiple resources into a

But here I would like to remind you that not all of the IaaS resources can be migrated, some configurations and features are temporarily not supported, such as the virtual machine's custom image, the boot diagnostics enabled advanced storage virtual machine, virtual network endpoint access control, virtual gateway, traffic Manager configuration file, specific migration support scope

How to migrate resources that have been deployed in ASM to arm

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.