Table of contents
Step 1: Introduction
Step 2: Sign in to Azure Portal
Step 3: Configure Basic Settings
Step 4: Configure Networking Settings
Step 5: Review and Create Virtue Machines
Step 6: Create the Virtual Machine
Step 7: Connect to virtual machine
Step 8: Install web server
Step 9: View the web server in action
Step 1: Introduction
What is Microsoft Azure Virtual Machine (VM) Scale Sets?
Microsoft Azure Virtual Machine Scale Sets is a way to configure and manage large numbers of Windows and Linux VMs within the Microsoft Azure public cloud as a single unit. By using scale sets, IT administrators can easily create and manage a group of load-balanced VMs in Azure at any scale, across multiple availability zones and fault domains and respond quickly to changing demand.
Below are guides on how to create and connect to Virtual Machine Scale Set.
Step 2: Sign in to Azure Portal
Go to the Azure Portal (portal.azure.com) and sign in using your Azure account credentials.
Step 3: Configure Basic Settings
Search for Virtual machines Scale Set.
In the Virtual machines page, select โ+ Createโ.
- In the Basics tab, under Project details, make sure to select the right subscription and then either select an existing resource group or choose to Create new resource group.
Under Instance details, enter the Virtual machine name, and choose Ubuntu Server 22.04 LTS - Gen2 for your Image. Leave the other defaults.
Under Administrator account, select SSH public key.
Enter azureuser as the username.
For SSH public key source, leave the default of Generate new key pair.
- Under Orchestration mode select Uniform and select Standard under Security. Then Under the Scaling configuration, click on the configure to input your scaling condition.
- Under Inbound Ports, this is the port that we will be using to connect to our Virtual Ubuntu Machine
Step 4: Configure Network Settings
- Under Network Interface, click + Create new nic then select SSH (22) and HTTP (80) from the drop-down.
- Also create a load balancer
*Step 5: Review and Create Virtue Machine Step
*
Review your settings and make any changes if required.
Step 6: Create the Virtual Machine
- After clicking on "Create," Azure will start deploying your virtual machine. It may take a few minutes for the deployment to complete.
- When the Generate new key pair window opens, select Download private key and create resource.
- When the deployment is finished, select Go to resource.
- Go to Load balancing and copy Pub;ic IP Address.
*Step 7: Connect to virtual machine *
Create an SSH connection with the VM.
On your Windows computer, open a Command prompt.
At your prompt, open an SSH connection to your virtual machine. Copy and paste the IP address on your Virtual machine.
Then type in the below command,
ssh -i โ/path/to /your/private-key-file.pemโ Username@Fronted IP Address
Step 8: Install web server
To see your VM in action, install the NGINX web server. From your SSH session, update your package sources and then install the latest NGINX package.
Type the below commands one after the other
sudo apt-get -y update
sudo apt-get -y install nginx
When done, type exit to leave the SSH session.
Step 9: View the web server in action
Use any web browser of your choice to view the default NGINX welcome page. Tycopy amd paste the public IP address of the VM as the web address.
Top comments (0)