One of the main reasons cloud computing has grown in popularity in recent years is because it eases the burden of server maintenance for individuals, small businesses, and large corporations. The wide range of computing services offered in the cloud also makes it attractive.

This guide shows you how to set up and configure a virtual machine (VM) in Azure, a cloud computing service from Microsoft.

Step 1: Sign in to Azure

First, sign in to the Azure portal. If you don't have an Azure account, you can sign up for an Azure free trial.

Once you have logged into your account, you will see the following screen.

The Azure portal home page shows you an overview of the resources you currently have, some selected services you can create, your subscription information, and so on.

Step 2: Create a Virtual Machine

To create a virtual machine, click the Create a resource Button that is listed under Azure Services. Azure then presents you with an overview of the resource categories as shown below.

Virtual machines in Azure fall under the To calculate Category, so go ahead and choose the option from the left sidebar. Then click on that Virtual machine under the heading popular offers.

Related: Practical Reasons to Use a Virtual Machine

Step 3: Configure Your Virtual Machine

Azure provides you with a template that you can use to create and configure your VM. The initial virtual machine configuration page looks like this:

All mandatory fields are marked with a red star and must therefore be filled out as follows:

Resource group

A resource group in Azure is a logical container that holds related resources. Click on that Create new Link is under the Resource group Field and give your resource a meaningful name that you like. The name of the resource group in this guide is az-virtual-machines.

Name of the virtual machine

The next step is to give your VM a name. Be sure to choose an appropriate name as Azure will use it to uniquely identify your VM instance.

region

Next up is that region Field that determines the location of the data center where your virtual machine is stored. Depending on your needs, your VM should ideally be placed in a region that is either close to you or close to you to avoid latency.

picture

The picture Box will help you choose the operating system of your choice that you want to install on your VM. Go ahead and choose the Ubuntu Server 20.04 LTS – Gen 1 Picture. You can choose any other operating system you want.

size

The size Field determines how powerful your VM will be. This also has an impact on the cost you pay for your VM. For simple tasks, you can choose a B1 VM that will cost you an average of $ 10 per month. It has 1 GB of RAM, a 32 GB SSD and a single-core CPU.

Azure also calculates the estimated cost of the VM for you, so move on to the VM that meets your needs. You can also use the See everything Size link under the Size field to view other Azure VM size offerings.

Administrator account

In this section, select the password and enter your username and login password. Remember to use a strong password as it will be used to log into your VM remotely.

Inbound port rules

According to the inbound port rules, port 22 is enabled by default so that you can access your server remotely via SSH.

You can further configure the inbound port rules later when the VM is up and running.

The most important VM configurations are on the basic Tab you are currently on. Azure also gives you other configurations on the tabs labeled Disk, Network, Management, and so on. You can continue with the default options on these tabs for now. Azure also allows you to customize these configurations later.

After filling in all the required fields, go ahead and click on that Review + create Button at the bottom of the configuration page.

If everything is OK, Azure will notify you that the validation passed. On the other hand, you will be notified if the validation fails. Azure also shows you a summary of the VM you created, including the estimated monthly cost.

If you want to change any configuration at this point, click on the Previous Button and make the necessary settings.

Azure also gives you the option to download an automation script by using the Download a template for automation Shortcut. You can use the automation script to easily create VMs in the future without spending time creating a resource. This is especially useful if you frequently create Azure resources or want to duplicate a VM.

Click on that Create Button to get your VM up and running and Azure will do the rest for you.

Step 4: access your VM

Once the deployment is complete, you will be notified with a screen similar to the following.

Click on that Go to resource Button to view details about your VM. Azure shows you an overview screen.

Your public IP address will also be listed and you will use this to access your server via SSH or other remote connection tools like SCP, SFTP, etc.

Start the terminal on your local PC. If you're using Windows, PowerShell is the recommended terminal. In Terminal, run the following command, where muo is the name of the username you want to configure on your VM server.

ssh muo @ your-public-ip-address

Remember to replace the word your-public-ip-address in the above command with the public IP address of your server. The system will ask you to enter a password. Enter the server password that you set up when you configured your VM.

Once you are logged in, the system will show you a prompt on your Linux server through which you can interact with your server.

Increase your cloud computing knowledge

This guide explains how to create a Linux virtual machine in Azure. The Azure platform has many services that support you in the fast, secure and cost-effective commissioning of IT infrastructure and services.

The demand for cloud engineers is increasing, which will also skyrocket competition. Stand out from the crowd by improving your cloud computing skills with online courses.

Grow your cloud computing knowledge today

Make sure your cloud skills are better than ever with this discounted package.

Continue reading

About the author

Mwiza Kumwenda
(29 articles published)

Mwiza is a professional developer of software and writes extensively on Linux and front-end programming. Some of his interests include history, economics, politics, and enterprise architecture.

More
By Mwiza Kumwenda

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!

One more step …!

Please confirm your email address in the email we just sent you.

Expand to read the full story