Migrate virtual machines across storage on the azure Platform

Source: Internet
Author: User

Customer Scenario Description:

Recently, the customer registered the azure test account (one month of use) for testing and use, and set up web site services. The customer developed the azure cloud platform for web development, we are very satisfied with the application service and are ready to officially put the web site into production. Because the azure test account can only be used for one month, the test account cannot be changed to the formal azure account.

The customer needs the following:

Migrate virtual machines and databases in the azure test account to the formal azure.

Virtual Machine migration method:

Method 1:

The Virtual Machine vhd and data vhd files are created as disks and downloaded to the local device. When being uploaded to the official account platform, the download and upload speed is too slow because the file data is too large, unacceptable,

Method 2:

How to copy a vhd disk across storage accounts on azure

Use method 2 to migrate virtual machines:

1. Copy account A to account B

2. First install Windows azure powershell

Download link: http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell? Fb = ZH-CN

3. Run get-azureenvironment on azure powershell.

650) This. width = 650; "width =" 1200 "Height =" 940 "Title =" 22.jpg" style = "width: 736px; Height: 565px; "src =" http://s3.51cto.com/wyfs02/M01/47/96/wKioL1P8mt6jlme9AAO13hOFZfs877.jpg "alt =" wkiol1p8mt6jlme9aao13hofzfs877.jpg "/>

4. Run get-azurepublishsettingsfile-Environment azurechinacloud in azurepowershell to download the file (publishsettingsfile)

650) This. width = 650; "width =" 1200 "Height =" 842 "Title =" 23.jpg" style = "width: 737px; Height: 635px; "src =" http://s3.51cto.com/wyfs02/M02/47/94/wKiom1P8mn-QVGQRAAQQ0d7cheo946.jpg "alt =" wKiom1P8mn-QVGQRAAQQ0d7cheo946.jpg "/> 5. when downloading a file, you must enter the Account B name and password on the azure platform. And save the file location

650) This. width = 650; "width =" 1054 "Height =" 807 "Title =" 24.jpg" style = "width: 740px; Height: 691px; "src =" http://s3.51cto.com/wyfs02/M02/47/94/wKiom1P8nQ6yox7-AAMcEdgb8ec909.jpg "alt =" wKiom1P8nQ6yox7-AAMcEdgb8ec909.jpg "/> 6. azure powershell executes import-azurepublishsettingsfile + download file path (for example, D: \) to import the downloaded file (publishsettingsfile), so as to successfully enter the subscription account

650) This. width = 650; "width =" 1200 "Height =" 843 "Title =" 6.jpg" style = "width: 739px; Height: 717px; "src =" http://s3.51cto.com/wyfs02/M02/47/96/wKioL1P8qCDj3K4vAAcFxCqr47g254.jpg "alt =" wkiol1p8qcdj3k4vaacfxcqr47g254.jpg "/>

7. The following shows the one-dollar test account, which has been set as the new default subscription name.

650) This. width = 650; "width =" 1200 "Height =" 842 "Title =" 10.jpg" style = "width: 737px; Height: 667px; "src =" http://s3.51cto.com/wyfs02/M01/47/95/wKiom1P8qrOTdq2pAAVSjdtOkW4014.jpg "alt =" wkiom1p8qrotdq2paavsjdtokw4014.jpg "/>

8. view the default storage account of Account B

650) This. width = 650; "width =" 1160 "Height =" 803 "Title =" 7.jpg" style = "width: 742px; Height: 636px; "src =" http://s3.51cto.com/wyfs02/M01/47/95/wKiom1P8qFvCyNooAAJQaLzbTrY376.jpg "alt =" wkiom1p8133 vcynooaajqalbtry376.jpg "/>

9. Run the set-azuresub‑currentstorageaccountname storage account "portalvhdsqr56z0jf96rg8" command in azure powershell to execute this command: Set Account B to the default storage account under the current subscription

650) This. width = 650; "width =" 1200 "Height =" 841 "Title =" 8.jpg" style = "width: 738px; Height: 680px; "src =" http://s3.51cto.com/wyfs02/M00/47/95/wKiom1P8qcXibGacAAVo_5XiVy8471.jpg "alt =" wkiom1p8qcxibgacaavo_5xivy8471.jpg "/> 10. the following shows the one-dollar test account, which has been set as the new default subscription name.

650) This. width = 650; "width =" 1200 "Height =" 843 "Title =" 9.jpg" style = "width: 737px; Height: 654px; "src =" http://s3.51cto.com/wyfs02/M02/47/97/wKioL1P8qxWhX2A5AAVcKfpX9K8118.jpg "alt =" wkiol1p8qxwhx2a5aavckfpx9k8118.jpg "/> 11. enter the subscription name again: one-dollar test account, as shown in

650) This. width = 650; "width =" 1200 "Height =" 843 "Title =" 11.jpg" style = "width: 738px; Height: 741px; "src =" http://s3.51cto.com/wyfs02/M02/47/97/wKioL1P8rBTxdajbAAVYdZ9uDNk315.jpg "alt =" wkiol1p8rbtxdajbaavydz9udnk315.jpg "/> 12. run $ context = new-azurestoragecontext-storageaccountname, portalvhdss3nlhwwr7q21m,-storageaccountkey secret/K + 7 in azurepowershell. Ziy1t +/c2ghx/s0eypvogzw = "-endpoint" core.chinacloudapi.cn "Purpose: enter the name and key of the B storage account.

650) This. width = 650; "width =" 1200 "Height =" 843 "Title =" 12.jpg" style = "width: 739px; Height: 635px; "src =" http://s3.51cto.com/wyfs02/M02/47/95/wKiom1P8rmPjqnIlAAUgqnZ8rE4108.jpg "alt =" wkiom1p8rmpjqnilaaugqnz8re00008.jpg "/> 13. storageaccountname (storage account name): portalvhds432bs5fb 837mm. You can find the name of the storage account below:

650) This. width = 650; "width =" 1161 "Height =" 807 "Title =" 13.jpg" style = "width: 744px; Height: 633px; "src =" http://s3.51cto.com/wyfs02/M01/47/97/wKioL1P8syeC5IvaAANF1VdP9yA941.jpg "alt =" wkiol1p8syec5ivaaanf1vdp9ya941.jpg "/> 14. storageaccountkey (storage account key): encrypt/K + 7ziy1t +/c2ghx/s0eypvogzw =. You can find the key of the storage account below:

650) This. width = 650; "width =" 1159 "Height =" 801 "Title =" 14.jpg" style = "width: 737px; Height: 667px; "src =" http://s3.51cto.com/wyfs02/M01/47/95/wKiom1P8u3GTySf_AAKFB9LccgA123.jpg "alt =" wkiom1p8u1_tysf_aakfb9lccga123.jpg "/>

15. before copying vhd files across storage accounts, you must set the container type of the & B storage account under your subscription account to public (if set to private, the copy cannot be completed ), see the following:

650) This. width = 650; "width =" 1163 "Height =" 805 "Title =" 15.jpg" style = "width: 739px; Height: 745px; "src =" http://s3.51cto.com/wyfs02/M02/47/95/wKiom1P8s_bQPmJ0AAHh1vfCyF0716.jpg "alt =" wkiom1p8s_bqpmj0aahh1vfcyf0716.jpg "/> 16. run start-azurestorageblobcopy-srcuri on azure powershell.

-Destcontainervhds-destblob web. vhd-destcontext $ Context

The purpose of executing this command is to copy the vhd file of a to another storage account, Web. vhd is the name of the vhd file copied to another storage account (this file can be written with any vhd name ).

650) This. width = 650; "width =" 1200 "Height =" 843 "Title =" 16.jpg" style = "width: 739px; Height: 700px; "src =" http://s3.51cto.com/wyfs02/M02/47/97/wKioL1P8uvTgqAT7AAeHVrJRkdY308.jpg "alt =" wkiol1p8uvtgqat7aaehvrjrkdy308.jpg "/> 17. log on to account B and check the copied. The file has been copied.

650) This. width = 650; "width =" 1163 "Height =" 804 "Title =" 17.jpg" style = "width: 739px; Height: 622px; "src =" http://s3.51cto.com/wyfs02/M02/47/95/wKiom1P8umiBROQLAAIP8QSysc0171.jpg "alt =" wkiom1p8umibroqlaaip8qsysc0171.jpg "/> 18. create a disk in account B

650) This. width = 650; "width =" 1166 "Height =" 806 "Title =" 18.jpg" style = "width: 740px; Height: 673px; "src =" http://s3.51cto.com/wyfs02/M00/47/97/wKioL1P8vOTi_rz1AAKD6j4pxkE085.jpg "alt =" wkiol1p8voti_rz1aakd6j4pxke085.jpg "/> 19. name the disk, and select include operating system and type

650) This. width = 650; "width =" 1163 "Height =" 806 "Title =" 19.jpg" style = "width: 738px; Height: 625px; "src =" http://s3.51cto.com/wyfs02/M02/47/97/wKioL1P8vVagthapAAIASX7n0i4719.jpg "alt =" wkiol1p8vvagthapaaiasx7n0i0000.jpg "/> 20. select the copied vhd File

650) This. width = 650; "width =" 1165 "Height =" 803 "Title =" 20.jpg" style = "width: 738px; Height: 714px; "src =" http://s3.51cto.com/wyfs02/M01/47/95/wKiom1P8vTSTVXaxAAGxMuSy2x8133.jpg "alt =" wkiom1p8vtstvxaxaagxmusy2x8133.jpg "/> 21. the disk is successfully created.

650) This. width = 650; "width =" 1097 "Height =" 807 "Title =" 21.jpg" style = "width: 740px; Height: 677px; "src =" http://s3.51cto.com/wyfs02/M02/47/95/wKiom1P8vZfxoU8uAAK4GLidH7s381.jpg "alt =" wkiom1p8vzfxou8uaak4glidh7s381.jpg "/> 22. create a virtual machine

650) This. width = 650; "width =" 1161 "Height =" 804 "Title =" 22.jpg" style = "width: 738px; Height: 622px; "src =" http://s3.51cto.com/wyfs02/M00/47/95/wKiom1P8vmmy-H3HAAKF-KBwStA893.jpg "alt =" wKiom1P8vmmy-H3HAAKF-KBwStA893.jpg "/> 23. select My disk and the created disk image

650) This. width = 650; "width =" 1162 "Height =" 805 "Title =" 24.jpg" style = "width: 740px; Height: 553px; "src =" http://s3.51cto.com/wyfs02/M00/47/95/wKiom1P8v4uDWiILAAI5ZJizhVg110.jpg "alt =" wkiom1p8v4udwiilaai5zjizhvg110.jpg "/> 24. virtual Machine name

650) This. width = 650; "width =" 1162 "Height =" 802 "Title =" 25.jpg" style = "width: 737px; Height: 609px; "src =" http://s3.51cto.com/wyfs02/M01/47/97/wKioL1P8wSrjdhh8AAIW9o4b4Iw320.jpg "alt =" wkiol1p8wsrjdhh8aaiw9o4b4iw320.jpg "/> 25 virtual machine configuration

650) This. width = 650; "width =" 1161 "Height =" 803 "Title =" 26.jpg" style = "width: 744px; Height: 631px; "src =" http://s3.51cto.com/wyfs02/M00/47/95/wKiom1P8wCiA2yvPAAK7h9Hjzgk959.jpg "alt =" wkiom1p8wcia2yvpaak7h9hjzgk959.jpg "/> 26. VM created

650) This. width = 650; "width =" 1053 "Height =" 728 "Title =" 26.jpg" style = "width: 739px; Height: 607px; "src =" http://s3.51cto.com/wyfs02/M00/47/97/wKioL1P8weGDZKC1AALf8TghOds686.jpg "alt =" wkiol1p8wegdzkc1aalf8tghods686.jpg "/> 27 the desktop file still exists after the VM is successfully connected

650) This. width = 650; "width =" 724 "Height =" 543 "Title =" 27.jpg" style = "width: 737px; Height: 566px; "src =" http://s3.51cto.com/wyfs02/M02/47/97/wKioL1P8wqSyxh1pAAD99Thvw9E033.jpg "alt =" wkiol1p8wqsyxh1paad99thvw9e033.jpg "/>







This article from "Liu xueyang-blog" blog, please be sure to keep this source http://liuxy.blog.51cto.com/9267679/1545457

Migrate virtual machines across storage on the azure Platform

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.