You are on page 1of 22

Creating A Virtual Network

Azure Virtual Network (VNet)


Azure Virtual Network (VNet) is the fundamental building block for your private network in
Azure. It enables many types of Azure resources, such as Azure Virtual Machines (VM), to
securely communicate with each other, the internet, and on-premises networks.
It is similar to a traditional network that you’d operate in your data centre but brings with it
additional benefits of Azure’s infrastructure such as scale, availability, and isolation. The main
purpose of a Virtual Network is to act as a communication channel between resources launched
in the cloud. Why Virtual? Because there are no actual routers or switches in the cloud.

● Step 1: Open the Azure management portal and log in to https://portal.azure.com

● Step 2: Click on “Create a Resource”.

● Step 3: Search for “Virtual Network” in the search bar and click on the search result
Virtual Network.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 4: Click on the “Create” button on the Virtual Network window.

● Step 5: After clicking create option, Fill in the required details:

1. Subscription: Choose a suitable subscription.


2. Resource group: Resource group is a container that holds related resources for an
Azure solution. You can keep the resource group as it is or you can also create one
by clicking “Create New”.
3. Username: Provide a valid username of your choice.
4. Region: Select your nearby region.

Click on the “Next: IP Addresses >” button to navigate to the IP address tab.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 6: In IP Address tab, Leave these options as it is as we can also modify them later
in the process.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 7: Click on “Next: Security >” to jump onto the next tab. Make sure these options
are Disabled.

● Step 8: Click on “Review + Create” for the deployment process to start. The Validation
will be passed. Now, Click on the “Create” button.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 9: You will now see a page displaying “Your Deployment is Complete”.

● Step 10: Afterwards, Go to the Home Page of Azure Portal and click on the Virtual
Machines icon. Click on “+ Create” to create a new Virtual machine.

● Step 11: After clicking create option, Fill in the required details. You have to keep some
options as it is but according to your need, you can change some of them.

1. Subscription: Choose a suitable subscription.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
2. Resource group: Resource group is a container that holds related resources for an
Azure solution. You can keep the resource group as it is or you can also create one
by clicking “Create New”.
3. Virtual Machine name: Mention a name for your virtual machine.
4. Region: Here you are going to create all the resources associated with your virtual
machine.
5. Availability Zone:
6. Security Type: You can keep it as its default value i.e., standard.
7. Image: Select Windows Server 2019 Datacenter – Gen2.
8. Size: You need to mention size as per your requirements.

● Step 12: You can also change the size by clicking on the change size hyperlink. The
window shown below will appear. Options will display according to your region. So,
Please select your regions accordingly. The default value will be displayed as
Standard_DS1_v2.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 13: Now, In the Administrator Account section, Enter the Username and Password
for VM login once it’s created.
In the Inbound port rules section, Select HTTP (80), RDP (3389) and SSH (22).
1. On a Web server or HyperText Transfer Protocol (HTTP), port 80 is the port that
the server “listens to” or expects to receive from a web client, assuming that the
default was taken when the server was configured or set up.

2. Remote Desktop Protocol (RDP) is a Microsoft proprietary protocol that enables


remote connections to other computers, typically over TCP port 3389. It provides
network access for a remote user over an encrypted channel.

3. SSH (Secure Shell) is an encrypted connection protocol that allows secure sign-ins
over unsecured connections. SSH is the default connection protocol for Linux VMs
hosted in Azure.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 14: This information is enough for creating a VM. But if required, there are other
configurable sections also. Now, Hit the “Next: Disks>” button at the bottom.

● Step 15: Firstly, you need to select the OS disk type. Here, we selected Premium SSD.
We are provided with three options – Premium SSD, Standard SSD and standard HDD.
1. Premium SSDs deliver high performance and low-latency disk support for VMs
with high IOPS.
2. Standard SSDs are optimized for workloads that need consistent performance at
lower IOPS.
3. At last, Standard HDDs delivers reliable, low-cost disk support for VMs running
latency-tolerant workloads.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 16: After completing the details in the disks section, You have to click “Next:
Networking >” at the bottom to jump to the next.

● Step 17: Fill in the following credentials in the Networking section.

1. Virtual Network: Add the name of your virtual network.


2. Subnet: You can keep this option as it is.
3. NIC (Network Security Group): You can keep this as default i.e., Basic.
4. Public inbound ports (IP): Although it will be already selected if not, you can
manually select “Allow selected ports”.
5. Select inbound ports (IP): Choose the option HTTP, SSH and RDP as you’ve done
in the Basics tab.
6. Load Balancing: You can keep it as None.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 18: Now, head towards the next step by clicking on “Next: Management >”.

1. Boot Diagnostics logs startup events and is helpful to trace in case VM does not start
by seeing logs.
2. OS guest diagnostics are generally written to an external storage account and are
helpful in case of creating alerts.
3. To reduce bills, the Auto shut down feature shut down the VM during the off-hours.
4. We can assign a backup policy that defines the frequency of backups and their
retention period.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 19: Jumping onto the next that is Advanced. Here, you can bring the VM to the
desired state after initialization and Install some extensions which can run scripts on
startup.

● Step 20: Now, the next section is Tags. Keep it as it is.


Tags are user-defined key/value pairs that can be placed directly on a resource or a
resource group. Tags may be placed on a resource at the time of creation or added to an
existing resource. We can also see consolidated billings by applying the same tag to
multiple resources.
Afterwards, click on the “Review + Create” button.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 21: Azure will authenticate the details you’ve filled so far and will show a message
as “Validation Passed”.
Afterwards, click on the “Create” button.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 22: After clicking the CREATE button. A message will be displayed – “Your
deployment is completed”.

● Step 23: Then, Go to Home Page and create another virtual machine by following the
same steps you followed above. Only modify these values :

● Resource group: Select the same resource group as the previous one.
● Virtual Machine name: Enter VM2.

After completing all the above steps, you’ll see that deployment is complete.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 24: Now, again go to the Home Page and you’ll see two Virtual Machines are being
displayed i.e., VM1 and VM2.

● Step 25: We are going to check the connection now. Here, you will allow ICMP
connections between VMs and test whether the virtual machines can communicate
with each other.

● Step 26: Now, Click on VM1 as you see in Step 24. On the Overview page, Go to the
“Networking” section > Add inbound port rule as shown in the image below.

● Step 27: After clicking on “Add inbound port rule”, Make sure that the protocol and
name must be ICMP. Leave all the options as it is, click on “Add”.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 28: You will see that the ICMP port rule will be added is the list.

● Step 29: Now, go to VM2, Click on the “Connect” button and select RDP.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 30: Download the RDP File.

● Step 30: Download and Open the RDP file. Click on the “Connect” button.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 31: Enter the username and password that you’ve entered while creating the
virtual machines. Click on “OK”.

● Step 32: Configurations of the remote session will start.

● Step 33: A warning certificate will appear on the screen during the process. Just click on
“YES”.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 34: Go to the Search bar and search for “Windows Defender Firewall with
advanced security”. Open it and click on “Inbound Rules” on the left navigation bar.

Search for File and Printer Sharing ICMP Rule. Enable it by right-clicking on it.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 35: Close the VM2 session and go back to the Azure Portal.

● Step 36: Go to VM1 Click on the “Connect” button and Select RDP.

● Step 37: Download and Open the RDP File. Click on “Connect”. Then, again enter the
username and password as you’ve entered earlier for VM2.

● Step 38: Now, on the virtual environment of VM1, Open “Windows PowerShell” and
run it as administrator by right-clicking on it.

● Step 39: Now, Run the command – “ping VM2” to ping VM2. Press “ENTER”.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.
● Step 40: You successfully pinged VM2 from VM1.

Contact Us
You can always reach out to us if you need help with this practice hands-on lab. For getting
help email us at hello@scholarhat.com or connect at the #support channel on Discord.

Copyright Dot Net Tricks Innovation Pvt. Ltd. | All rights Reserved.

You might also like