Click here to Skip to main content
13,863,150 members
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 8 Jun 2018
Licenced CPOL

Creating Virtual Machine (VM) on Microsoft Azure

, 10 Jun 2018
Rate this:
Please Sign up or sign in to vote.
This article will focus on creating VM, i.e., a Virtual Machine on MicrosoftAzure.


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.

  1. Open the Azure web site, i.e.,

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

  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 VMs. Since we are creating new and we do not have existing ones, so it would be blank. Click on "Create virtual machine."

  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 the cost involved.

  3. 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:

  4. You’ll get the window of the license agreement and legal terms read that carefully and press "Create button".

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

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

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

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

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

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

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

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

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

  14. 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!

Here is a list of articles that will help you getting good insights about Azure, Blockchain, Ethereum and Smart Contracts development using Solidity.

1. Creating Virtual Machine (VM) on Microsoft Azure[^]
2. Setting up Ethereum Blockchain on Azure[^
3. Blockchain Development (Part 1): Development Environment Setup for Smart Contracts[^
4. Blockchain Development (Part 2): Programming Smart Contracts using Solidity, Truffle and Test-RPC[^]


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Akhil Mittal
Architect Magic Software Inc.
India India
Akhil Mittal is a Microsoft MVP(Most Valuable Professional), C# Corner MVP, Codeproject MVP, a blogger, author and likes to write/read technical articles. Akhil has an experience of around 11 years in developing, designing, architecting enterprises level applications primarily in Microsoft Technologies. Akhil enjoys working on technologies like MVC, Web API, Entity Framework, Angular, C# and BlockChain. Akhil is an MCP( Microsoft Certified Professional) in Web Applications (MCTS-70-528, MCTS-70-515) and .Net Framework 2.0 (MCTS-70-536). Visit Akhil Mittal’s personal blog CodeTeddy ( for some good and informative articles.
Group type: Collaborative Group

717 members

You may also be interested in...


Comments and Discussions

QuestionCosts when over the limit Pin
Ayren Jagar13-Jun-18 3:02
memberAyren Jagar13-Jun-18 3:02 
AnswerRe: Costs when over the limit Pin
Akhil Mittal 25-Jun-18 9:56
mva Akhil Mittal 25-Jun-18 9:56 
Generalits really helpful Pin
mayank yadav8-Jun-18 21:32
membermayank yadav8-Jun-18 21:32 
GeneralRe: its really helpful Pin
Akhil Mittal 10-Jun-18 8:58
mva Akhil Mittal 10-Jun-18 8:58 
PraiseMy vote of 5 Pin
Vikas Sharma8-Jun-18 21:29
professionalVikas Sharma8-Jun-18 21:29 
GeneralRe: My vote of 5 Pin
Akhil Mittal 10-Jun-18 8:58
mva Akhil Mittal 10-Jun-18 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web06 | 2.8.190214.1 | Last Updated 11 Jun 2018
Article Copyright 2018 by Akhil Mittal
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid