A Step-by-Step Guide to Creating an Azure Virtual Machine

Shrihari Haridas
5 min readDec 9, 2023

--

Azure, Microsoft’s cloud platform, offers a versatile range of cloud services, and within this ecosystem, Azure Virtual Machines (VMs) play a pivotal role. Imagine Azure VMs as flexible, virtualized computers that operate in the cloud. What sets them apart is the freedom to pick your preferred operating system, install the software you need, and adapt the virtual machine’s resources to match your specific requirements.

This scalability ensures that you have the right amount of computing power, whether you’re hosting a website, running applications, or tackling data-intensive tasks. The “pay-as-you-go” model is a key benefit, as you only incur charges for the resources you use, making Azure VMs a cost-effective solution for beginners and businesses alike.

What we learn in this blog…!

In this blog, we’ll guide newcomers and individuals with prior cloud experience (e.g., AWS or GCP) who are new to Azure on how to create Azure Virtual Machines (VMs) step by step. We’ll cover the basics of Azure, provide a clear understanding of Azure VMs, and walk you through the process of setting up your VMs, with cost management and best practices included. Whether you’re new to Azure or transitioning from another cloud platform, you’ll leave with the knowledge to create and manage Azure VMs effectively.

  1. Login to your Azure account
  2. Search for “Virtual Machine” service

3. After clicking on it, you will see a dashboard with multiple options related to Azure Virtual Machines.

4. Next, click on the ‘Create’ button. Here, you should select the first option, which is ‘Azure Virtual Machine,’ and then follow the configuration shown in the image below.

A. Subscription: I am using “Pay as you go,” but if you are a new user, there may be different options such as the free tier. Select accordingly.

B. Resource Group: It’s a logical separation of resources in a group. You can create groups for your development, staging, and production environments, or you can combine them. Keep in mind that by deleting a resource group, you can delete all resources inside it. So, I am creating a new resource group.

C. VM Name: Give a name to your virtual machine.

D. Region: Select the region where you want to create your VM.

E. Availability Zone (AZ): Choose an AZ based on your selected region.

F. Image: Select the image you want. In my case, I am using Ubuntu.

G. Size: Choose the size based on your requirements. You can also select “B1ls,” which has 0.5 vCPU.

H. Authentication Type: Choose your preferred authentication method. In my case, I am using SSH public key.

I. Port: We use port 22 for accessing the machine.

5. Next, click on ‘Next,’ where you will select the disk configuration.

Choose ‘Disk Size’ as ‘By default’ to avoid additional charges. Select ‘OS Disk Type’ as ‘Standard SSD,’ and keep the other options as their default settings. Then, click ‘Next’.

6. After that, you will see other tabs where you should select the default settings for ‘Networking,’ ‘Management,’ and ‘Monitoring.’ In the ‘Monitoring’ tab, remember to keep ‘Boot Diagnostics’ set to ‘Disable.’ Proceed through ‘Advanced,’ ‘Tags,’ and finally, you will reach the ‘Review and Create’ window. Verify all the settings, and once confirmed, it will start the creation process. Before proceeding, don’t forget to download the private key.

7. When you see ‘Deployment in Progress,’ it means your machine is being created. Please wait for it to complete successfully.

8. Next, click on the ‘Go to resource’ option, where you will find all the information about your machine, including options to start, stop, terminate, and details about the public IP, private IP, and more.

9. After that, click on the ‘Connect’ option and select ‘SSH using Azure CLI.

10. Next, a new window will pop up. You can agree to the conditions and then click ‘Connect.

11. If you encounter a ‘storage not mounted’ error during the connection process, simply click on ‘Create Storage.

12. Here, you will see your Ubuntu terminal.

13. To terminate the machine, look for the bar where you’ll find the ‘Delete’ option. Select that option.

14. Next, you’ll see a list of items to be deleted along with the VM. Click on ‘I Agree’ and then proceed with the deletion.

Conclusion

In conclusion, this guide has walked you through the process of creating and managing Azure Virtual Machines step by step. Whether you’re new to Azure or transitioning from another cloud platform, you now have the knowledge to set up, configure, and use Azure VMs effectively. Remember to follow best practices and cost management tips to make the most of your Azure VMs.

References: Azure

--

--

Shrihari Haridas
Shrihari Haridas

Written by Shrihari Haridas

Hello everyone, I am Shrihari Haridas I am a Cloud & DevOps Engineer, I work with most of DevOps Tools like, Jenkins, Git, Docker, etc.!& for Cloud AWS

No responses yet