Migration journey for Windows Azure VMS

Source: Internet
Author: User

Today's main focus is on how Azure VMs migrate from geographical zone A to geographic B.

Scenario: The VHD in storage a under the same subscription is copied to storage B. A copy to B, just use the VHD link for a.

There is currently an azure VM in eastern China and the storage account is East China.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/83/wKioL1WeoY2gpPSzAACJDi5N12A086.jpg "height=" 126 "/>

We assume that we want to migrate VMS to northern China, as a general idea and practice, is to simply keep the disk and then delete the virtual machine action.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/83/wKioL1WeoY7xVvZKAAB48-TC3wc503.jpg "height=" 326 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/83/wKioL1WeoY_BdIlvAACZKJIPgdU030.jpg "height=" 126 "/>

You can see the disk VHD files that we have preserved on the disk (we need to wait a few minutes because Azure storage is cached);

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/86/wKiom1Wen7-w1gdLAADqehBMp0Y759.jpg "height=" 192 "/>

New Virtual Machine (note: The location shows East China, we continue to try to create VMs in the north)

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/86/wKiom1Wen8WzMmYKAAIRWs374A0199.jpg "height=" 651 "/>

You cannot create a virtual machine in the north;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/86/wKiom1Wen9WQBGHlAAHpUoart0g080.jpg "height=" 599 "/>

I think we all understand that the main point is that the virtual machine VHD file is located in eastern China, so the VHD of the associated VM can only be the Eastern region location.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/86/wKiom1Wen-bggpQeAACJIIqDjd0613.jpg "height=" 123 "/>650) this.width=650;" title= "image" style= "border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px; padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" http://s3.51cto.com/ Wyfs02/m02/6f/83/wkiol1weobraqnwfaad924zrhay337.jpg "height=" 191 "/>

How do we move the virtual machine from the east to the north, with a focus on migrating the storage location of the VHD. Because the storage blob for Azure is geographically redundant by default.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/86/wKiom1Wen_Gj4rCSAABT4pQCVgw521.jpg "height=" 337 "/>

Here we go, we're going to start migrating VHDs.

First, don't use Windows Azure PowerShell's little partner, trouble download Link: https://www.microsoft.com/web/handlers/webpi.ashx/getinstaller/ Windowsazurepowershell.3f.3f.3fnew.appids

1. Open Microsoft Azure Powershell and enter get-azurepublishsettingsfile-environment Azurechinacloud to get your subscription account information for Azure;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/87/wKiom1WeoADRk62zAAHvpqwHFGk218.jpg "height=" 225 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/83/wKioL1WeoeLgKXLGAAU4R5LlHfA344.jpg "height=" 622 "/>

2. Import the file just now;

Input: Import-azurepublishsettingsfile "****.publishsettings"

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/83/wKioL1WeoeXwSvJyAAJvSu0SHe8627.jpg "height=" 252 "/>

3. Need to store accounts (east and north) in different regional locations VHDs container configuration common container;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/83/wKioL1Weoe-C75H5AAFxfRpyAyc267.jpg "height=" 581 "/>

4. Define the storage account name and key to be migrated to North China;

Input: $context = new-azurestoragecontext-storageaccountname "Storageaccountname" –storageaccountkey "Storageaccountkey "-endpoint" core.chinacloudapi.cn "

PS: The-endpoint "core.chinacloudapi.cn" of the command indicates that Azure is assigned to the Chinese region, and if not specified, it points to global Azure.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/83/wKioL1WeofGRuietAAJvwLgDxJA724.jpg "height=" 636 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/83/wKioL1WeofLyQCxCAAEZ_HYzHX4689.jpg "height="/>

5. Migrating storage blobs from the east to storage blobs in the north

Input: Start-azurestorageblobcopy-srcuri url-destcontainer VHDs (container name not mistaken)-destblob Copy.vhd (to be renamed)-destcontext $ Context

Srcuri is the storage URL for the virtual machine VM just now.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/83/wKioL1WeofKh3tVZAAD1Ieywp9U144.jpg "height=" 237 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/87/wKiom1WeoCKRyhEhAAMD2Bm7Tdc782.jpg "height=" 352 "/>

The speed is very fast, the basic is the second migration.

6. After migrating the VHD, we will create the VHD to disk;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/87/wKiom1WeoCPiFneoAAIZNPnmeoA079.jpg "height=" 614 "/>

Thump thump, this operation will be an error. The error is a lease credential conflict.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/83/wKioL1WeofWCE9hmAACe_64-PhM746.jpg "height=" 127 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/87/wKiom1WeoCTDKPVoAAFUEel6Oqo814.jpg "height=" 488 "/>

Why is it. I consulted with support for the century interconnect, and the answer was cache-led. But is this the real situation? I've been waiting for more than half an hour to wait for the so-called cache removal time, and then I tried my own way to solve the problem.

My personal view is that the VHD has a unique identifier, and when the VHD is still on disk or mirrored, Azure has already given this unique identifier to the disk VHD, unless the VHD is not a disk or a mirror, so I can keep the associated VHD.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/87/wKiom1WeoCTh6sFnAABaFQwokdU718.jpg "height=" 286 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6F/87/wKiom1WeoCXioDRiAAEAfsa19EI176.jpg "height=" 388 "/>

You can finally create a new disk.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6F/87/wKiom1WeoCXgHJndAAB36vf1GaU615.jpg "height=" 102 "/>

New Virtual machine

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6F/87/wKiom1WeoCbisxCdAAGW2-1P9-I414.jpg "height=" 643 "/>650) this.width=650;" title= "image" style= "border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px; padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" http://s3.51cto.com/ Wyfs02/m02/6f/83/wkiol1weofiauzljaaht60tnrve049.jpg "height=" 651 "/>

This article from "Gs_hao" blog, declined reprint!

Migration journey for Windows Azure VMS

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.