Move Windows Azure virtual machines from one cloud service to another cloud service!

Source: Internet
Author: User

Recently we have customers who often talk about a problem that I have created for different cloud services. But my goal is to build a different virtual machine under the same cloud service, and now I'm all set up, but I found out I built the virtual machine wrong, how to do?

I worked hard to build a virtual machine, not even in the same cloud service inside. I don't want to make too much money, is there a way? Of course, the way to do this is to use our PowerShell script to complete our virtual machine to migrate our VMS to the same cloud service below, this follows our steps below:

First of all we are of course downloading Azure Powershell. Please refer to the Azurepowershell mentioned earlier in my blog.

Next we execute the PowerShell command, which first executes the Pour subscription account and executes the following command: Add-azureaccount-environment Azurechinacloud ( If your account is in the global version of Azurecloud).

Since we currently have multiple azure operations accounts, I need to set up my second account as an operating account because it is currently the first Azure account:

We then use the Select Azuresubscription command to choose a second subscription account:

OK, let's see if our own set-up account has the machine we built, let's get our VM,GET-AZUREVM.

Let's take a look at the specific virtual machines, we want to merge our PilotS1 and PilotS2 into the same cloud service, let's take a look at the specifics of the two machines, and first look at PilotS1, currently deployed in the Pilottest cloud service:

Let's take a look at PilotS2 's information:

We can see that there are different machines in different cloud services, what if we need to merge the two machines into the same cloud service for special reasons? Come in one of our orders:

1. First I need to export a configuration file that needs to be merged into another cloud service, Export-azurevm-servicename pilots2-name pilots2-path d:\azuremove.xml:

2. There is a file on our D drive, which is the file we just exported:

3. Next, we need to remove this machine from the cloud service, noting that removal is not a deletion. We execute the following command:


4. Because the guidance to the same cloud service means that the port may be duplicated, in order to avoid this situation, we need to modify the default port to the cloud service that needs to be merged. So we need to modify the following file:

5. Next we use this XML file to create our virtual machine, all the configuration files and access accounts are in our files, so he actually executed the Mount program to mount our application, but unfortunately, the error, how to do?

6. We still go back to our Windows Azure Powershell interface and execute the following command to query our current subscription ID:

7. Next we will set up our SubscriptionId and our storage account correspondence:

8. We will then proceed to the following order:

9. Next we'll look at our virtual machine status:

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Move Windows Azure virtual machines from one cloud service to another cloud service!

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.