This article will focus on creating VM, i.e., a Virtual Machine on Microsoft Azure. Microsoft Azure provides many cloud services and getting a virtual machine is one of those. One can create a virtual machine (for example, a remote desktop machine on the cloud) and access the same with the provided credentials. Azure gives us the flexibility to choose the type of machine. For example, client or server and the operating system and machine configuration of one’s choice. So, it gives the flexibility to create a small machine or set up a huge configuration machine based on requirements. Each configuration and component chosen had a price that depends on how long and how much the VM is used. In this article, I’ll set a VM on Microsoft Azure step by step and this article will be more of a tutorial form.
Azure is a cloud platform from Microsoft and provides numerous resources in the context of cloud computing. One of the resources is a virtual machine. For example, a fully functional machine of your choice with the choice of your configurations and operating system could be created within seconds with just a few clicks and you can access the machine remotely from anywhere with your secure credentials and do whatever you want. For example. hosting your website, developing applications, creating production or test environment for your software, etc. Let’s see step by step how we can achieve that.
Azure Account Setup
If one does not have a paid Azure account, one could leverage Azure’s new account’s benefits of giving $200 credits. That means if you are new to Azure and want to play around with its free trial, you’ll get $200 credits that you can use to explore Azure. If you are new to Azure and do not have an account, follow the process I illustrate below, else directly login to your portal.
- Open the Azure web site, i.e., azure.microsoft.com.
- Click on Start free to create your free Azure account and get $200 as credits.
Creating an account and claiming $200 would need your credit/debit card for verification purposes only and will not deduct any amount from your card. You can play around with this credit and account for 30 days. You’ll see the signup page, where you fill all your information and signup step by step. Once signed-up successfully, you’ll see the link to the portal as shown below:
Click on the portal and you land up on the dashboard and are ready to use/play around with Azure.
Virtual Machine Setup on Azure
- Once on the dashboard, click on the "Virtual machines" link on the dashboard and a right panel would open where you see all your VMs. Since we are creating new and we do not have existing ones, so it would be blank. Click on "Create virtual machine."
- Once you click on Create virtual machine, you’ll get to see all the operating systems and solution templates that Azure provides to create a machine. You can choose to have Windows or Linux operating system based on requirements, but be careful about the cost involved.
- Since this article is for learning how to create a virtual machine, I’ll choose the Windows client machine with minimal machine configurations, but one can choose based on requirements and need. So, choose "Windows Client" as shown in the following image:
- You’ll get the window of the license agreement and legal terms read that carefully and press "Create button".
- After clicking Create, you’ll be asked to fill some basic requirements as shown below. Give the name as per your choice. For example, I gave it "
AKHILPC". Leave VM disk type as SSD, or choose as per your need. Provide username and password you would be needing when you connect remotely with the machine. Keep the username and password safe and secure. Choose the subscription, if you have a paid one, choose that else choose the trial subscription that you got. You must provide a resource group. You can create a new or use an existing one. Resource Group gives you a logical separation of all your Azure resources. Since I have an existing resource group created, I am using that. Choose Location, click on confirmation checkbox and click OK.
- Once you click OK, you get to see the second section to choose the size of the machine where you see the list of RAMs, Hard disk size, SKU, and zones. Each configuration has a cost associated with it so choose as per your need and budget. For training/tutorial purposes, I am choosing the first one that has the minimum cost as shown below:
- In the third step, you need to choose certain settings related to availability, storage, and network. Choose/Provide the settings as per your discretion.
- Once you click OK, you’ll be shown a summary page for all the configuration you choose, cost per hour and OS. Give confirmation if everything looks good by clicking on confirmation checkbox as shown in the below image and click on Create button.
- Once you click Create, it may take a while to create your VM. It will say "Submitting deployment for…". Wait until the deployment is complete. For me, it took 5~9 minutes.
- Once deployment is done, you’ll see the section for your deployed VM, where you can choose to Start, Stop, Restart, Move or Delete your created VM. Clicking on Connect will show you two options in the right panel, i.e., RDP and SSH. We’ll choose to connect via RDP, so download the RDP file shown at the right panel. Click the blue "Download RDP file" to get the file. Alternatively, you can directly open RDP connect via mstsc command on your local machine. You get the IP address as shown below in RDP section.
- The downloaded RDP file will be located at your local download location. Click on that to configure RDP connection.
- The IP would automatically be filled, just fill the username and password to connect.
- Once the connection is successful, you’ll see the Welcome message while window loads and configures for first-time use. Please wait for a while.
- Once Windows loaded, you’ll see the desktop as shown below. Now you can choose to do whatever you want with this machine.
Note for the time you use the machine, you’ll be charged hourly. In case you do not want to use the machine for some time or stop the machine daily at a defined time, you can do that manually by clicking on Virtual Machines option at your Azure dashboard. You’ll see your VM. Select your VM and click Stop. You can Start whenever you want. Thus, you can save a lot of costs.
Moreover, by clicking on your select VM, you can monitor its hourly/daily usage statistics as shown below.
See how easy it was to set up a VM on Azure with just a few simple clicks? Now you do not have to depend on any physical machine to do your job.
In this article, we learned how to setup a Virtual Machine (VM) on Microsoft Azure. With few simple steps, we can set up a machine of our choice based on our need and requirements and moreover, we can have full control over that machine and cost. So, no more depending on your IT office guys or your Networking guys. Cheers!