Creating a Windows 11 Virtual Machine in Azure. A Step-by-Step guide.
Tags: azure, beginners
Published: 2024-06-19 07:58:39

## Virtual Machine (VM).
A virtual machine (VM) is an emulated or virtualized version of a physical computer that runs programmes and deploys apps using software rather than hardware.
Businesses may operate numerous virtual machines with various operating systems on a single device by using the memory, CPU, network interface, and storage of a single physical computer.
Assume you own a real computer, such as a desktop or laptop. Comparable to a computer within your computer is a virtual machine. It uses the hardware you already have and emulates a real computer with software. A virtual machine offers an environment that is totally separated and different from your actual computer. On a virtual machine, you may run many operating systems and programmes without compromising the functionality of your host computer. You may, for instance, build a virtual machine that runs Linux on a Windows PC and vice versa. They have a great deal of flexibility. On a single physical computer, you may build many virtual machines, each with its own operating system and set of apps. This enables you to have distinct settings for various tasks, such as experimenting with new software or applications, e.t.c.

Services for cloud computing offer resources and infrastructure that are reachable and available online. Azure allows you to set up and maintain cloud-based virtual machines, so even when your local computer is powered down, your server will always be operational.

## Azure Virtual Machines.
Azure is an online portal that allows us to manage and access cloud services and various resources
Azure Virtual Machines offers a range of networking capabilities and related services such as Azure Virtual Network, public and private IP addresses, network security groups, virtual private networks (VPN), and Azure ExpressRoute that enable connectivity and security and ensure high availability for your applications.

## Requirements Before Creating an Azure Virtual Machine

- 
Create an Azure account
- 
The names of your resources

- 
The location where the resources are stored

- 
The size of the virtual machine

- 
The maximum number of virtual machines that can be created

- 
The operating system that the virtual machine runs(Linux/Windows)

- 
The configuration of the virtual machine after it starts

- 
The related resources that the virtual machine needs

## The major components of an Azure virtual machine are:

- 
Resource Group
- 
Vm size

- 
Virtual Network

- 
Images [Ubuntu/Windows]

- 
Virtual Disk [ Storage ]
![Azure VM Components](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tn710j58qbme31kib8ri.png)

## Creating an Azure Virtual Machine
There are four ways to create a VM (resource) on Azure.
You can can employ any of the listed methods:

- 
Azure Portal

- 
Azure CLI

- 
Azure PowerShell

- 
Azure ARM Templates

We are only looking at using the Azure portal.

## Provisioning a Windows 11 Virtual Machine in Microsoft Azure Portal - A Step-by-Step Guide.

1. Navigate to the [Azure portal](https://azure.microsoft.com/en-us/get-started/azure-portal) and click on "+ Create a resource"

![Creating a resource in Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfazes7cfv1faq1uz43s.png)

- The popular Azure services page opens and you can select and create resources based on your project.

- Select "Virtual machine" to create a VM
 
![Azure services and market place](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z56h9c9ndr3qao6bz99x.png)

- From the "Basics" tab, select your subscription


![Azure subscription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3v4d3bffd6ho0mertekv.png)

- Create a new Resource group by selecting "Create new" just below the subscription field, Give your Resource group a name and click on "OK"

![Creating a Resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2ukv6wzkzbtszgn6zju.png)

- Give your VM a name. When naming your VM note that Azure resource names cannot contain any special characters, whitespace, or begin with "_" or end with "." 
Select your region based on your target audience to reduce latency and to improve the end-user experience.
Select your "Availability Options" This is to build redundancy in your project - for this guide I will select "No infrastructure redundancy required". Choose your "Availability zone" and "Security type".
In the image field, select "Windows 11 Pro, version 22H2 -x64 Gen2" since we are creating a Windows 11 VM.


![Creating a VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijw9jupx7ynxsocaj3tf.png)

- Choose your disk size based on your workload requirements from the drop down menu

- Next give your Administrator account a username and password, then confirm the password. (Ensure you use a strong password for the security of your VM).

- Select your inbound port from the drop down menu. For this guide, I will select RDP (3389) which means Remote Deskstop Protocol which is on port 3389. This option will enable me to connect remotely to the VM.

- Check the "licensing" checkbox before proceeding. Azure offers both Azure-provided licenses and Bring Your Own License (BYOL) options, and staying updated on Microsoft's licensing terms is essential to ensure full compliance.

- Next, click on "Next:Disk>"


![Creating a virtual machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfh2m9xwb4y6l14ugyfn.png)

- Choose your "OS disk size" based on your space requirements.
Next, select the "OS disk type". For better performance, you can select "Premium SSD". Leave other options as default then click on "Next: Networking>" to proceed.


![Creating a VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvpz8cbp3pi1ahtsh3h7.png)

- In the networking section, leave the set default parameters and select the "Next: Management>" button.


![Creating and Azure VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2skp7xvhayokjdsma3u.png)

- Leave all parameters on default on the management interface and select the "Next: monitoring" option at the bottom of the page.


![Creating and Azure VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gdes1xy03klkhblfvfy.png)

- All parameters on the Monitoring page should be left as default. Then click on "Review + create>" to proceed.


![Creating and Azure VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3a2iz3btp2elx9n2r6ij.png)

- Azure will validate your VM configuration and provide the cost information of using the VM per hour and a summary of your VM configuration.
Next click on the "Create" option at the bottom of the page.


![Validation page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8ibn1v25ho2a1p7la9y.png)

![Summary of services page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w79xsv8ffexl7ofa83p7.png)

- The Windows 11 VM was successfully deployed.
Click on "Go to resource to view the newly created VM.


![VM created successfully](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7yad45h79fk2b66xd7fg.png)

- Click on "Connect" to establish a Remote Desktop connection (RDP).

![VM details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/slglv8a9ngbfx9av29ga.png)

- Download the RDP file to connect to the VM using Remote Desktop Protocol (RDP).

![RDP](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qsl5l6xlml8bk74uvhc.png)

- Connect to the VM using the username and password entered when setting up the VM.


![Windows 11](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nprqa5bljtv7hqmqisxg.png)


![Windows 11](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6a3fgbag6j5iaq5ds2jh.png)

_Please comment below if this has been helpful._
_