Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

[Forum FAQ] How To Deploy Multiple Virtual Machines in the Same Cloud Service on Windows Azure

$
0
0

When you create a virtual machine, a cloud service is automatically created to contain the machine. You can create multiple virtual machines under the same cloud service to enable the virtual machines to communicate with each other.

When you place virtual machines in the same cloud service, you can load balance your application and services by configuring load-balanced endpoints.

Firstly, we should create a virtual machine with a new cloud service, then we can add the second virtual machine to the same cloud service.

Steps:

1. Create the first virtual machine and cloud service.

Sign in to theWindows Azure Management Portal.

On the command bar, click New (Figure 1).

Figure 1: Sign in to the Windows Azure Management Portal

2. Click Virtual machine, and then click From Gallery (Figure 2).

Figure 2: Create a new virtual machine

3. In Choose an image, select an image from the lists. Click the arrow to continue. This time we choose the Windows Server 2012 R2 Datacenter image (Figure 3).

Figure 3: Select a system image

4. Type a name for the virtual machine in Virtual Machine Name field, an administrative account in New User Name field, type a strong password for the user account in New Password. For this time, we could use TestVM1 as the Virtual Machine Name, TestUser01 as New User Name. Click the arrow to continue (Figure 4).

Figure 4: Complete the information

5. Then we should create a new cloud service for the first virtual machine. Type the cloud service DNS name.This name becomes part of the URI that is used to contact the virtual machine through the cloud service. We could use TestCloud01 as the cloud service DNS name.

In Region/Affinity Group/Virtual Network, select where you want to locate the virtual machine.

You can select a storage account where the VHD file is stored. In this demo, accept the default setting of Use an Automatically Generated Storage Account.

Under Availability Set, we should create a new Availability set for the first virtual machine, we will use this availability set to add the second virtual machine. We could use the TestAvail as the Availability set name (Figure 5).

Figure 5: Virtual machine configuration

6. Under VM Agent, decide whether to install the VM Agent. This agent provides the environment for you to install extensions that can help you interact with the virtual machine.

Under Endpoints, review the new endpoints that will be created to allow connections to the virtual machine, such as through Remote Desktop and Windows PowerShell remoting. You also can add endpoints now, or create them later (Figure 6).

Figure 6: Virtual machine configuration -2

7. Click the check mark to create the first virtual machine.

We can check the VM creating status by clicking the detail. Just waiting for a few minutes.

Then we will see the VM is created successful. The status of VM is running (Figure 7).

Figure 7: Create virtual machine

8. Create and add the second virtual machine to the same cloud service (Figure 8).

After the first virtual machine is created, on theWindows Azure Management Portal command bar, click New.

Click Virtual Machine, then click From Gallery.

And then select an image from the Choose an image page. Choose the Windows Server 2012 R2 Datacenter image in this demo.

Type the virtual machine name, user name and password. For example, TestVM2 as the virtual machine name, TestUser02 as user name. Click the arrow to continue.

Figure 8: Setup the second virtual machine -1

9. In cloud service, select the cloud service that created at first.

In Region/Affinity Group/Virtual Network, select region that we want to host the virtual machine. It is recommended to choose the same region with first virtual machine.

To use an availability set, select the one that we created when created the first virtual machine.

Review the default endpoint configuration (Figure 9).

Figure 9: Setup the second virtual machine -2

10. Click the check mark to create the connected virtual machine.

After the second virtual machine is created, click the Cloud service created, click INSTANCES and the two Virtual Machines will appear (Figure 10).

Figure 10: Setup is finished

If you need further assistance, welcome to post the questions in our Windows Azure Virtual Machines forum.


Keyword: Windows Azure, Create Virtual Machine, Cloud Service


Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>