Step-by-Step Guide: How to Create and Connect a Windows 11 Pro Azure Virtual Machine
Tags: azure, windows, cloudcomputing, vm
Published: 2024-06-14 12:51:04

``**Table of contents**
Step 1: Create an Azure Account
Step 2: Create a Virtual Machine 
Step 3: Choosing VM Configuration
Step 4: Review and Validation
Step 5: Deploying the Virtual Machine
Step 6: Download Key Pair (For SSH Access):
Step 7: Connect to virtual machine
Step 8: Clean up resources

In this blog, I'll be creating an Azure Virtual Machine
Below are step-by-step instructions:

**Step 1: Create an Azure Account**
If you don't have an Azure account, sign up for one at Azure Portal.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3880kmd3mkk1t8poiqcu.jpg)

**Step 2: Create a Virtual Machine** 

- Open your web browser and navigate to https://portal.azure.com.
Sign in using your Azure account credentials.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bdz2pt2sfkv2x5l4nhrt.jpg)

- 
Navigating to Virtual Machines
After logging in, you’ll land on the Azure dashboard. 
In the left-hand menu, click on “Virtual machines”This will take you to the Virtual machines section, where you can manage your VMs.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogi48fuzg3p0rxkzhrwx.jpg)

- 
Creating a New Virtual Machine
Click the “+ Add” button to start creating a new virtual machine.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uaqz7qgekox3mpeoeu62.jpg)


**Step 3: Choosing VM Configuration**

Begins with configuring the basics of your VM under which we have the following:

- 
Subscription: Choose the appropriate subscription.

- 
Resource Group: Create a new or select an existing resource group.

- 
Virtual machine name: Give your VM a unique name.
Region: Choose the data center region closest to you.

- 
Availability options: Select the availability preferences.
Image: Choose the operating system image you want to use.

- 
Size:select the appropriate configuration for your VM based on CPU, memory, and storage requirements. Carefully review the available sizes and consider your workload needs.

- 
Administrator account: provide a username and a password. The password must be at least 12 characters long and meet the defined complexity requirements.
 

- 
Inbound port: Choose Allow selected ports and then select RDP (3389) from the drop-down.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4b4okj8yks07ggvn8em.jpg)

Leave the remaining defaults and then select the Review + create button at the bottom of the page.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4yw0wf9jelyjap1vpk8w.jpg)

**Step 4: Review and Validation**

Review all your configuration settings to ensure accuracy.
Validate that your selections align with your intended VM setup.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3n6xr3kjgzz43sy9rnax.jpg)


**Step 5: Deploying the Virtual Machine**

- 
After validation runs, select the Create button at the bottom of the page. 



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1yp1udvtk5f4422mf23m.jpg)

- 
After deployment is completed, select Go to resource.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zhxyoi48mqj9f8sw9g1l.jpg)

**Step 6: Download Key Pair (For SSH Access):**

If you’ve chosen SSH key authentication, now is a good time to download the generated key pair. This key pair will be crucial for securely logging into your virtual machine. Make sure to store the private key in a safe and accessible location, as it will be used to authenticate your SSH sessions.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dlv569s7mmh5ilovozix.jpg)


**Step 7: Connect to virtual machine**

- 
Create a remote desktop connection to the virtual machine. These directions tell you how to connect to your VM from a Windows computer. On a Mac, you'll upneed an RDP client such as this Remote Desktop Client from the Mac App Store.
On the virtual machine section, select the Connect > RDP


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2v1imxh2xnrmaaedcr6.jpg)

- 
In the Connect with RDP tab, keep the default options to connect by IP address, over port 3389, and click Download RDP file


- 
Open the downloaded RDP file and click Connect when prompted.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k4lmfglhys7zaqsvxu14.jpg)

- 
In the Security window, select More choices and then Use a different account. Type the username and password you created for the virtual machine, and then click OK.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdzcl88xol0oz69j78qf.jpg)

- 
You may receive a certificate warning during the sign-in process. Click Yes or Continue to create the connection.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z3cbmj6g65bkthnib9i2.jpg)

**Step 8: Clean up resources**

**Delete resources**
When no longer needed, you can delete the resource group, virtual machine, and all related resources.

- 

On the Overview page for the VM, select the Resource group link.

- 
At the top of the page for the resource group, select Delete resource group.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2zufrqqtrh9ctl0k1st.jpg)

- 
A page will open warning you that you are about to delete resources. Type the name of the resource group and select Delete to finish deleting the resources and the resource group.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aujb0djvn7xja7j3hvgj.jpg)