This is the second part of a series where I am going to explain how to create an Azure Virtual Network, Subnets, and Network Security Groups and how to associate them with Virtual Machines.
If you have missed Part 1, you can read it here.
To understand more about what Virtual Networks, Subnets, Network Security Groups are and topics around them, read my article here.
You will need an Azure Subscription to go ahead with this demo.
Step 1
Create a new Virtual Machine with Windows Server 2012 R2 Datacenter.
Create a new Virtual Machine with Windows Server 2012 R2 Datacenter.
Step 2
When you click on "Create", a new blade will be opened.
When you click on "Create", a new blade will be opened.
Step 3
Fill out the fields in the basic settings. Use the existing resource group that you had created for the virtual network and click on OK.
Fill out the fields in the basic settings. Use the existing resource group that you had created for the virtual network and click on OK.

Step 4
For the size and configuration, use DS1_V2 Standard type and click on Select.
For the size and configuration, use DS1_V2 Standard type and click on Select.

Step 5
Keep yes on the managed disks. The Virtual Network would be chosen by default. Select the subnet as FrontEndSubnet and keep the public IP address as it is.
Keep yes on the managed disks. The Virtual Network would be chosen by default. Select the subnet as FrontEndSubnet and keep the public IP address as it is.

Step 6
Keep the Network Security Group as none. Since we have already added NSG to our subnet, we don't need to add it here again. Basically, you can add NSG to either of the three levels i.e. at the VNet level, at the subnet level or at the VM level.
Keep the Network Security Group as none. Since we have already added NSG to our subnet, we don't need to add it here again. Basically, you can add NSG to either of the three levels i.e. at the VNet level, at the subnet level or at the VM level.

Step 7
Create a new availability set and give a name to it. Keep the fault domains as 2 and keep the update domains as 5. (If you want to read about what are Availability Sets, Fault Domains and Update Domains, read my article here).
Create a new availability set and give a name to it. Keep the fault domains as 2 and keep the update domains as 5. (If you want to read about what are Availability Sets, Fault Domains and Update Domains, read my article here).

Step 8
Keep the Boot Diagnosis and Guest OS Diagnosis as disabled.
Keep the Boot Diagnosis and Guest OS Diagnosis as disabled.











ankush jainPosted Feb 13, 2021, 7:01 PM
Article is fantastic but as I studied NSG can be applied only at Subnet or NIC level, not VNET level. So you should correct this - "Basically, you can add NSG to either of the three levels i.e. at the VNet level, at the subnet level or at the VM level."