Guidelines to creating an Azure Linux Virtual Machine

Guidelines to creating an Azure Linux Virtual Machine

A Virtual Machine (VM) is a computing resource that uses software instead of a physical computer to run programs and deploy apps.

The guidelines for the creation of a Linux Virtual Machine on Microsoft Azure are stated as follows:

  1. To create a Virtual Machine - Linux or Windows, a user must have a valid Azure account and subscription. With such in place, sign in to the Azure portal (portal.azure.com) using your Azure account.

  2. Right on your dashboard, click on "Create a resource". On the immediate page, there are several popular Azure services of which Virtual Machine is one. Click on "Create" on the "Virtual Machine" menu.

  3. The page for the creation of a virtual machine is opened. The first section to be populated with the necessary details is the Basic. In this section, there are sub-sections. The first is the Project details; select a subscription, and select the resource group if it has been previously created. It can be created from this instance as well with your preferred name. Next is the Instance details sub-section; input your Virtual machine name, and select the Region in which the VM will be deployed. Also, select the type of Image; this image is an Operating System for the VM. In Azure, there are different sizes and these sizes determine the performance of your VM. We are selecting a Linux image because we are creating a Linux VM.

  4. The next sub-section is the Administrator account. Unlike Windows VM which has just the option of Password, the Linux VM has 2 options - SSH Public Key and Password. In these guidelines, I will be making use of the SSH Public Key as the Administrative account. The details (Username, SSH public key source and Key pair name) are to protect your VM from unauthorized access. It is strongly advisable to have your Key pair name recorded safely as the detail will be required whenever you want to login to the VM.

  5. The SSH public key source has a drop-down where you can select the option on how to generate your Key pair name. I selected the option "Generate new Key pair". The newly generated key pair is Lordbumkey.

    Lastly, allow selected port by selecting SSH (22) for secured communication between networked devices.

    The Disk is the next section. Select the type of OS disk type and size that support your workload.

  6. The other sections (Networking, Management, Monitoring, Advance and Tag) could be skipped as all pre-select variables are perfect to deploy a VM. They could also be changed to meet your need. Select Review + Create to pass Validation. Click on Create afterwards for the creation of the VM.

  7. Once the Create is clicked, a page will be displayed informing us to "Download private key and create resource", click on it to download.

  8. The key will be downloaded and in this case, it is downloaded into the Download folder and the deployment process starts.

  9. After the deployment is complete, click on Go to resource for the overview of the VM and click on Connect to connect the VM.

  10. A page will be opened to select a connection via Native SSH and as soon as this is selected, another page on the left-hand side of the page will be displayed to download the RDP file to your physical computer

    .

  11. On the Native SSH page, follow steps 1 - 3. Copy the path to the SSH key you downloaded and paste it into the space provided in Step 3. Finally, copy the SSH command from the key that was downloaded in the Download folder.

  12. Go to the download folder, right-click on the downloaded key file and "Copy as path"

    .

  13. Paste the "Copy as path" in the space provided in Step 3 and copy the SSH command for execution on the PowerShell.

  14. Open the Windows PowerShell on your window search area. If you do not have a Powershell installed on your computer, you can download and install it for both Windows and MacOS.

  15. Login into your Azure account on the PowerShell with the command "az login" and press "enter" on the keyboard.

  16. Paste the earlier copied SSH command in the Powershell and you will be prompted to confirm your connection to the VM. Type "yes" and press "enter" on the keyboard. The VM will be instantly connected.

  1. On the Azure portal, the status of the VM has changed to running. This implies that the VM is fully operational.

I hope that with these guidelines, we would be able to create a functioning Azure Linux Virtual Machine.

Please do not hesitate to comment on any observations.