Deploying a Virtual Machine in Azure
In this section, I want to go through what goes into deploying a virtual machine. Now when you deploy a virtual machine on the Azure platform, yes it does deploy the virtual machine resource. But there are a number of other resources that deployed along with the virtual machine.
- Virtual Network → Virtual machine needs to reside in a virtual network. This is like a home for the virtual machine.
- Disks → There is an OS disk that is assigned to the virtual machine. (This is used to holding the OS level data.) And you can add your own disks onto the virtual machine.
- Network Interface → This is assigned to the virtual machine. So all the packets of data that’s sent by the virtual machine and received by the virtual machine goes via this network interface. The network interface can get a private and public IP address.
- Network Security Group (NSG) → This is assigned to the network interface card. This is like a firewall. This is used to decide what is a type of traffic that flows into and out of the virtual machine.
In this section, we are going to go ahead and see how to create a virtual machine in Azure.
Step 01. You can either go ahead and click on creating a new resource with the plus button on the top, or you could go on to the virtual machine section.
So I already have a virtual machine in place. (Currently they are in the stop or deallocated state)
Step 02. So let’s go ahead and create a new virtual machine. So over here, let me go ahead and create a new machine. So over here, you are now, presented with a wizard that will help us with the process of creating VM.
In the wizard, you basically have different categories that you have to go out and complete in order to go ahead and create a VM.
Subscription ⇒ Choose a subscription plan here. So remember, when it comes to the billing aspect for the resource in Azure, the billing aspect is done against the subscription. Every resource has to be linked onto a subscription, and every resource also needs to be linked onto a resource group. So, resource group is used for logical grouping of resources.
Step 03. And choose a resource group. If you don’t have an existing resource group, click on create new button over here, and you can create a new resource group.
Step 04. Go out and give a name for machine itself.
Step 05. Then you have to decide what is the region or the location for the VM. (If you're using azure free account, you might not be able to choose a region of your choice when it comes to the creation of the VM. So again, based on the account you are using, please note that there might be some restrictions.)
Step 06. When it comes to the availability options, so over here at the moment, I’m going to go ahead and choose no infrastructure redundancy required.
Step 07. Now, next, when it comes to the image, so what is the underlying OS, the operating system that you want to base in your VM. For this, I’m going to choose Windows, server 2019 data center.
Step 08. Now, over here, when it comes to the size of the machine, so currently it is assigning me a size that is known as Standard_D2_v2. So based on this size configuration, it’s going to go ahead and allocate two virtual CPUs and is going to allocate 7 gigs of memory (RAM). Also overhear, you can see an estimated cost per month. If you want to change the size of the machine, it’s possible.
Step 09. Next you have to provide username and password. (This is known as the administrator login). Please note that there are restrictions for the password itself.
Step 10. There is something known as inbound port rules. (This will allow us to connect RDP into instance.)
Since this is a windows based instance, we have to go out and use the remote desktop protocol to log into the azure VM.
Next in the disks section you can see the all the disk info. You can actually go and add assign additional data disk as well.
Next the networking section, Now by default this wizard will also go ahead and create a new virtual network. So if you don’t have a virtual network in place, it’ll actually go out and create a new virtual network.
In the Management section, I’m leaving everything as it is.
Also, in the Advance section, I’m leaving everything as it is.
Next Review+ Create section, you can see the all the settings you’re specifying for the creation of the VM.
The important aspect to note is that what you're going to be charged per hour. You can actually review all the settings on the particular screen. And every thing is OK, we can go ahead and hit on create. So overhear, we are going ahead with the process of creation of VM. This might take around 4–5 minutes.
Okay, in my next article, let’s talk about common issues when deploying a virtual machine and how to connect to a virtual machine.