In this article, I am going to walk you through all the steps which are needed to create a VM on Microsoft Azure. In order to do this tutorial, you need to be subscribed on Azure. If you are not, you can easily subscribe from Azure Portal, you need to have a Microsoft email account and one credit card. So my assumption now is that you have subscribed already and we can start this tutorial.
Start VM Creation Wizard
After sign in into Azur portal, you can see the toolbar which you can access to different resources. In order to create a VM, we are going to use Azure wizard. To open the wizard there are different ways. You can open it by clicking on Create a resource from the left toolbar and then choose a resource which is a Virtual Machine in this case. Usually Azure recommends the popular resources and you can see in the picture that the first recommendation is Windows Server 2016 Datacenter. So you can click on like and the wizard will be started az a new blade.
There is also another way, you can click on Virtual machines from the left toolbar and then click on Add button on the blade toolbar.
Then the wizard will be shown.
Don’t get panic since you just need to configure some fields and there are a lot of settings which are either prefilled or have suggestions. So let’s have a look one by one.
The first tab is the basic information, in the first field, you have to specify the subscription by choosing from the list and then choose a resource group. If you did not create resource group yet, there is a link under the text box which you can use to create one (You may see this link on other Azure resources which you can use to create a resource if you do not have).
Then you choose a name for your virtual machine. If you are creating several VM’s for different clients and the environment, it’s good to define a naming convention to have more structure and makes it easier to understand. For now, you can name your VM anything for example TestVM.
The next field is region, which is the place VM will be created. It is good to choose a closest region to your location to have better connection.
I skip the availability set which is not the case in this tutorial so let’s look at the Image list. If you click on the list, it will show you the list of the OS Images you can choose to use for your server. In this tutorial, I chose Windows Server 2016 Datacenter but if you like to create something else, you can choose it from the list. After that, you can specify the CPU unit and memory in the size field. If you click on Change size, you can see the list of different specifications based on CPU unit, memory and etc.
In this list, you can slo have a look on the cost of each specification so it gives you an estimation how much it is going to cost every month. So choose what suits for you but do not worry about it since youc an chnage that any time later!
Then you have to define admin credentials for the VM. After that click next to go to the next tab. Next tab is about VM’s disk.
When you create a VM, Azure will create an OS disk by default for each VM so you only need to define a new disk if you need more space for your application or something else. You can also change the OS type. There are three different options. If you are interested to know about the differences between disks, you can have a look on this page which described well all of them. For now, I leave as it is and click on next to go to the networking tab.
In the networking tab, you have to define your virtual network. Azure will fill fields with default value but if you want to change any value, you can just select a different virtual network from the list. You can leave the subnet field as it is and also the public ip. You need public ip to be able to make RDP connection to your server. For NIC security group just choose basic and for public inbound ports choose allow selected ports. Then for Select inbound ports choose 3689 or RDP which you need for Remote Desktop Connections. Put other fields the same value as it’s shown in the picture above and click next!
This tab is easy to configure. It’s about some basic management features. I put boot dianostics to on to see the OS startup image. It helps if you face with nay issue on OS startup. For the rest I put them to off and click next.
In this tab, you choose different extensions to be installed on your VM after VM creation is finished. For example, you can choose third-party services like NewRelic and also you can install different agents on your VM. I suggest skipping this step since you can do it later.
In this stpe, you can define some tags for your VM. These tags are really useful since in different places on Azure you can use them to filter your resources. I leave it empty since I can define it later. I can not wait to see the VM so I click on next to see the last page.
In this page, Azure will show all the specifications you have defined for your new VM. You can also see the price estimation on the top which is per hour. So everything is ready to create Azure VM.
Azure will give you the automation script for this VM. It is really interesting, isn’t it? So you can download it and see how Azure defines VM’s settings in ARM template to use them for VM Creation automation and later you can use this template and you may change some settings and redeploy this VM again. For now, click on create and after a couple of minutes, your VM is ready!