Creating and Connecting to a Linux Virtual Machine Scale Set
Efficiently Managing and Scaling Your Linux Infrastructure
- Login to the Azure Portal
Type “Virtual Machine Scale Set“ in the search bar
Choose “Virtual Machine Scale Set“ in the options
- Click on Create
- Fill the fields in the Basic tab
At the scaling section, choose “Autoscaling“ then click on “configure”.
- Edit the “Scaling Conditions“ by clicking on the pen symbol
Fill in the conditions necessary for the VMSS.
- Always make use of the information icon at each field to learn more.
- Click “Save“ when you are done highlighting the conditions.
Confirm your changes.
Choose a “Scale-In-Policy“
Check the “Apply force delete to scale-in-operation“ checkbox
Click “Save“
Choose the Linux image you wan to use.
Choose the disk size
Choose the SSH public key
Rename the “Username“ or leave the default.
Click on the “Next“ button until you get to “Networking”
- Edit the “Network Interface”
At the “Public Inbound Ports“, select the “Allow selected ports“ option
Check Port 22 for SSH and Port 80 for Web browser.
Enable “Public IP Address“
Click “OK“
In the Load Balancing Section, choose “Azure Load Balancer“
Create a Load Balancer or select if there is an existing one.
If newly created, give the Load Balancer a name.
Click “Create“
- Click on “Review + Create“ button
- Once validation is passed, click on create.
- One the dialog box that pops up, click on “Download private key and create resource“ option
- Note the location on the computer a .pem file is downloaded to.
- When deployment is complete, go to resource.
- On the left pane of the window, click on “Instance“ to see the number of VMs created.
- To connect to the VMSS, open command prompt on your computer. Note, always run as administrator.
Type this command on the command prompt. Then press enter key on the keyboard.
ssh -i location\filename username@ip-address -p 50000
location: where the downloaded file is on the computer
filename: the name of the downloaded file
username: the username you created when deploying your VMSS. The default is azureuser
ip-address: you can use the ip address of the load balancer to connect to the VMSS
Type yes when asked. and press enter on the keyboard
- Once the green lettering shows on your command prompt, then you have successfully connected to the VMSS
How to get the location and filename of the downloaded file.
You can use the copy and paste method.