How to create a VM in Azure

Sathya
5 min readMay 17, 2021

--

Today I am going to show how to create a Virtual machine using Azure. So let's start by asking the most fundamental question what is Azure.

Azure is a cloud computing service created by Microsoft for building, testing, deploying, and managing applications and services through Microsoft-managed data centers.

So now the next question is what is a VM. If we look in google we will get an answer like this

“Virtual machines are based on computer architectures and provide functionality of a physical computer”

Yes, the above definition is true the only difference is that today we are going to create a virtual machine in the cloud. With this technology, we can carry our computer anywhere anytime and any moment of our life Oh sorry I didn't mean time travel lol. OK OK let's be serious here. What I mean is that our computer is safely present in Microsoft Azure and can be accessed from any computer securely. Today we are not going in-depth about the VPN, Subnets Gateways, etc and I am not gonna make you feel scared with big scary terms ok. Today we are just gonna dip our feet into a vast ocean. So sit tight.

The first and foremost thing is you should have an Azure account with a subscription. If are a Beta Microsoft Learn Student Ambassador then you will have enough credits to do what I am gonna tell you. For all others who are students and wanna do this for free then you should get a GitHub account and activate your student developer pack from https://education.github.com/pack

After activating link your GitHub with Azure. you can also do this directly from the Azure website.

After you successfully created an account with a subscribtion. Now go to the Azure portal.

https://portal.azure.com/#home

It will look like this. Now, let's start creating our VM. I hope you guys are excited. Don't worry we will make this small bloggy thing interesting ok.

  • Step 1 is to click that cute computer-like icon that is sitting in a stylish manner next to the + sign. After you click it the screen will look like this.
  • Step 2 is to click the Add icon and then click the Virtual Machine option. The screen will look like this.

Step 3 is to create a resource group. Hey, don't be scared with the name. It's right there under the subscriptions. Click on create new and give a beautifully unique name. Now give a name to your machine don't give any keyword like test or anything. Now self a region. If it's already there then leave that there unless you don't wanna change it. Now select an Image. I selected the Ubuntu server.

  • So far so naa. Now the 4th step is actually to fill the Administrator account section. There I prefer SSH Key rather than password and username. For the sake of this video, I am using password-type authentication. Give a nice username and password.
  • Now set the port rules. Here I am giving selected ports and ging SSH(22). There are many methods to secure your IP using Azure Baston, VPN, SSH keys, etc. But here I am just showing you how to simply create a VM.
  • Now the most important step is to choose the right size for your VM. I am selecting Standard B1ls with1vcpu. I think it will be enough for learning and playing about VMs.
  • Now click next and when you reach networking do click the RDP option as it will sometimes help if you are not good with the command-line interface
  • Now if you want to create a tag you can then click review and create
  • Congratulations guys you have successfully created your own VM
  • If you wanna see it then you should copy your public IP and inside your computer Terminal type ssh username@publicIP then enter your password. If you want to access this on your phone Download Termius from Playstore or AppStore link it with your GitHub to get premium service then directly enter your public IP username and password there under the host and leave the rest blank.

That's it try this out and have fun. Do check out my video regarding how to connect VM ion your phone with termius.

--

--