Creating and Connecting to a Virtual Machine in a Custom Virtual Network using Azure Portal
Tags: azure, cloudcomputing, cloudskills, cloud
Published: 2024-04-24 13:54:44

## Step 01: Sign in to the Azure Portal

1. **[Go to Microsoft Azure Portal.](https://azure.microsoft.com/en-in/get-started/azure-portal)**
    
2. **Sign in to your Azure account.**

---

## Step 02: Create a Virtual Network
1. **In the Azure Portal, click on "Create a resource" in the upper-left corner.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upzvhl6zc9hqe1lphh2u.jpg)

2. **Search for "Virtual network" and select it from the results.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iylnp0pjlbpv7ls579ve.jpg)
    
3. **Click on "Create" to start creating a virtual network.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thk6a3pkb3o9xkvcgb72.jpg)
    
4. **Fill in the required information such as name, address space, and subnet details.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7jw17urakiyardl5d0g.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqryhssin9cjdykqb8aj.jpg)
    
5. **Once configured, click on "Review + create" and then click on "Create" to create the virtual network.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utdoy7km9ne33890w32b.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ln7jykus1zb90koj6q9w.jpg)

---

## Step 03: Create a Virtual Machine

1. **In the Azure Portal, click on "Create a resource" again.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qvr0isx7wnp78ire2y3g.jpg)
    
2. **Search for "Virtual machine" and select it from the results.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3q9k91yg969d2ke69ev9.jpg)
    
3. **Click on "Create" to start creating a virtual machine.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb8xjipwe02qtlviypja.jpg)
    
4. **Fill in the required information like resource group, virtual machine name, region, image, size, etc.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oi7wwmffss84pbkx12dz.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8j2wqruiyrl56d79ndnu.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wby9sbd6dqpeymptn7yi.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iu4mj0tbrp1fb3ppvzde.jpg)
    
5. **Under the "Networking" section, select the virtual network you created in step 2 and configure other networking settings as needed.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkvte8fxssaej8zj567r.jpg)
    
6. **Configure other settings like disks, management, tags, etc., according to your requirements.**
7. **Once configured, click on "Review + create" and then click on "Create" to create the virtual machine.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egqe2fik1eogzs8kt2me.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qn07qa5xcp499poo3dh0.jpg)
    
---

## Step 04: Connect to the Virtual Machine using RDP
1. **Once the virtual machine is created, navigate to the virtual machine resource in the Azure Portal.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6isg5ijg1e3q2b2rh7h3.jpg)
    
2. **In the virtual machine's overview page, click on "Connect" at the top.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9evc5ab4qrbwggr0x4n7.jpg)
    
3. **Download the RDP file and open it.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6sxklt80l7ad876so81.jpg)
    
4. **Enter the username and password for the virtual machine (these are the credentials you specified during VM creation).**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91m90fp4rsphoio4wc4f.jpg)
    
5. **Click "Connect" to initiate the RDP session.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y25msq0asyuwvl7bmhgx.jpg)
    
---

## Step 05: Verify Connection

**After connecting via RDP, you should be able to access the virtual machine's desktop and interact with it as if you were physically sitting in front of it.**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22qfawna6xk0iwrchyw7.jpg)