Creating Virtual Machine (VM) On Microsoft Azure

Introduction

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; i.e. 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; i.e. client or server and the operating system and machine configuration of one’s choice. So, it gives flexibility to create a small machine or set up a huge configuration machine based on the requirement. 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

Azure

Azure is a cloud platform from Microsoft and provides numerous resources in context on cloud computing. One of the resources is a virtual machine, i.e., a fully functional machine of your choice with the choice of your configurations. The 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 e.g. -  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 you do not have a paid Azure account, you could leverage Azure’s new account’s benefits of giving $200 credits. That means if you are new to Azure and wants 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 following process, else directly login to your portal.

  1. Open the Azure web site i.e. azure.moicrosoft.com

    Azure

  2. Click on "Start free" to create your free Azure account and get $200 worth of credits.

    Azure

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.

Azure

Click on the portal and you land up on the dashboard and are ready to use/play around with Azure.

Azure

Virtual Machine Setup on Azure
  1. Once on the dashboard, click on the “Virtual Machines” link on the dashboard and a right panel would open where you see all your VM’s. Since we are creating new and we do not have existing ones, it would be blank. Click on “Create Virtual Machine”.

    Azure

  2. 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 costs involved. 

    Azure
  1. Since this article is for learning how to create a virtual machine, I’ll choose the Windows client machine with minimal machine configurations, one can choose based on requirements and need. So, choose “Windows Client” as shown in the following image.

    Azure

  2. You’ll get the window of the license agreement and legal terms. Read that carefully and press “Create button”.

    Azure
  1. After clicking Create, you’ll be asked to fill in some basic requirements as shown below. Give the name as per your choice, for e.g. 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 to the machine. Keep the username and password safe and secure.

    Choose the subscription. If you have a paid one, choose that otherwise 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 check box, and click OK.

    Azure

  2. 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 purpose, I am choosing the first one that has the minimum cost, as shown below.

    Azure

  3. In the third step, you will need to choose certain settings related to availability, storage, and network. Choose/provide the settings as per your discretion.

    Azure

  4. Once you click OK, you’ll be shown a summary page for all the configurations 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.

    Azure

  5. Once you click Create, it may take a while to create your VM. It will say “Submitting deployment for…”. Wait till the deployment is complete. For me, it took 5~9 minutes.

    Azure

  6. 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.

    Azure
  1. The downloaded RDP file will be located at your local download location. Click on that to configure RDP connection.

    Azure

  2. The IP would automatically be filled, just fill the username and password to connect.

    Azure

  3. Once the connection is successful, you’ll see the Welcome message while the window loads and configures for the first-time use. Please wait for a while.

    Azure

  4. Once Windows is loaded, you’ll see the desktop as shown below. Now, you can choose to do whatever you want with this machine.

    Azure

Note that 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 money.

Azure

Moreover, by clicking on your selected VM, you can monitor its hourly/daily usage statistics, as shown below.

Azure

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 upon any physical machine to do your job.

Azure

Conclusion

In this article, we learned how to setup a Virtual Machine (VM) on Microsoft Azure. With a few simple steps, we can set up a machine of our choice based on our need and requirements and moreover, can have full control over that machine and cost. So, no more dependency on your IT office guys or your Networking guys. Cheers!