Setting Up a Windows 11 Virtual Machine with Azure on a MacOs
Tags: azure, macos, virtualmachine, cloud
Published: 2024-05-18 02:18:48

---
title: Setting Up a Windows 11 Virtual Machine with Azure on a MacOs 
published: true
description: A step-by-step guide on setting up a Windows 11 virtual machine in Azure portal on a MacOS.
tags: Azure, macos, virtualmachine, cloud
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hetzeernekhyvh9n23i9.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-05-12 13:22 +0000
---

In this post, I'd like to share how I created a "resource" in Azure portal. By definition, a resource in an Azure portal is a service required to create a product or solution. In Microsoft Azure, everything needed for a business solution is colloquially called "resource". In this case, the resource that I will be creating in Microsoft Azure Portal is called a "virtual machine". Virtual machines are scalable computing resources that can be used to deploy applications on the cloud. VMs -short for virtual machines - are listed under [Microsoft Azure's](https://azure.microsoft.com/en-us/products/virtual-machines#:~:text=Azure%20Virtual%20Machines%20offers%20a,high%20availability%20for%20your%20applications) Infrastructure as a Service (IaaS) category. 

The first step in creating a virtual machine is getting a Microsoft account. Once you have a Microsoft account click this link to create an [Azure free trial account](https://azure.microsoft.com/en-us/). 
![Try Azure for free](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lygwngql3yfpqdpuhla2.png)
Click on the "Try Azure for free" button. This takes you to the page below. 

Scroll and click "sign up" for the Azure free account card. 
![Try Azure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9507ayezfkb6k4ev2cri.png)
![Sign up for a free Azure account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ozwfctgj4ildnb0x7yi.png)

The next page will ask for your Microsoft login details. On the next page, fill in the required information. You need to enter your credit card details at some point during the registration. Note that only $1 is deducted initially for the 30-day free Azure service and after 30 days, Microsoft begins to charge for the services used. 

This Free Azure account is designed to offer customers free tier services to test new applications and evaluate the benefits of cloud computing. When you start using Azure with a free account, you get a $200 credit to spend in the first 30 days after you sign up. 

At the Azure platform (after completing the Registration ) like the image below:

![Azure Portal Landing Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03qtmia8w3vnse39g7a3.png)

There are three options available to create a virtual machine resource. The first approach is the search bar labeled "1" in the image above. At the search bar, you can search for "virtual machine", and from the dropdown, select "virtual machine" from the list. The second approach is labeled as "2" and in this option, you can select the virtual machines icon to create a virtual machine. The third option is to click the "Create a resource" icon. Either way allows for the creation of a virtual machine. 

After selecting the "Virtual Machines" icon and the "create" button 

![create button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dch9sprcme99o2x7ayvl.png)

that appears on the next page displayed, select "Azure Virtual Machine" from the list. 

![List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8md24vvslose1s1rya81.png)


## Basics Tab

This takes us to the "Create a Virtual Machine" page below:

![Create a Virtual Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnrofjfso9nplov6anib.png)

There are 8 tabs at the top level of that page, and the first tab of concern is "Basics" annotated in a red rectangle.

![Basics Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fmgce49gbrwjoy3dulwl.png)

### Project details

Below the top-level tab is the "Project details" section which consists of "Subscription" and "Resource group". The "Subscription" gives you the admin privilege to create resources. "Resource group" is a container for grouping similar items in Azure. In Azure, there will be a need for a container to group similar things. Give the "Subscriptions" and the "Resource group" labels names. I gave mine "Azure subscription 1" and "AzureRG" as shown in the above image. 
For the "Resource group" label select "Create new" to give it a name. 

### Instance details

The next section of concern is the "Instance details" labeled "1" in the below image:

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

#### Virtual machine name

Under this section there are subheadings like:
"Virtual machine name", "Region", "Availability Options", and "Availability zone" just to mention a few. 

The Virtual machine is just like a computer in the cloud, and normally your physical computers have a name. So in this section, give the virtual machine a name. I named mine "BusinessVM" as shown in the image below:

![BusinessVM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08ou4ykt801ffpk4s2t1.png)

#### Region

Next, move to the "Region" label. "Region" describes a geographical location where data centers are located. The Region selection should be done based on the understanding of the availability of support and other factors.

![Region](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfr5ntn696nvpnl38qu1.png)

#### Availability options

The next label is the "availability options".
![availability options without selection ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vn3lz9um96wiqebt3xe5.png)
This infers that the user should set up alternatives per adventure if something goes wrong. As you can see in the image below, I chose the "Availability zone" option.
![availability options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/romsa6yis2re0oeul2x3.png)

#### Availability zone
After "availability options" the next label is "Availability zone". This is a drop-down list of available zones for users to select the number of data centers to use. Availability zones in Microsoft Azure are made up of physical & logical data centers that have been segregated. This drop-down list is made up of zone 1, zone 2, and zone 3 and they are interconnected with highspeed internet network, cooling, and power. I selected zone 1 and zone 3 in the image below. 
![Availability zone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k2a9piszkaid5b57kn0y.png)

It is possible to select all three zones, but my preferred size (discussed in 3 labels below ) dictates the number of zones I can use in my virtual machine. Note also that the number of zones selected will alter the virtual machine names. In this example, I selected 2 zones: "zone 1" and "zone 3". As a result, I will end up with 2 virtual machine names called "BusinessVM-1" and "BusinessVM-2". This means I will have 2 virtual machines distributed between the 2 zones I selected earlier.

#### Security type
For the "security type" label, select "Trusted launch virtual machines" from the drop-down menu. (see below)

![security type](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zk7xcxx91bh86pnn4nyp.png)

#### image
Next, it is required that I select the Operating System that will be running in the virtual machines. This post is about Setting Up a Windows 11 Virtual Machine. So at the "image" label, select the drop down list to reveal operating systems that can run in the virtual machine being created. 
![operating system](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ygiifqkf603pqh9q5kw6.png)
I selected Windows 11 as the preferred Operating System.

### VM Architecture
The "VM Architecture" label radio button selection should be retained at "x64".

#### Run with Azure Spot discount
Do not tick "Run with Azure Spot discount" box

#### size
At the "size" label, there was a warning in "2" in the image below saying "This size is not available in zone 1,2,3. Zones 1,3 are supported". It says the "Standard_B1s..." isn't available in zone 1,2,3. This made me select the "see all sizes" in "3" below to see my options.
 
![sizes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6siwvtyiq9cnvln28nw8.png)

I am taken to a page titled "Select a VM Size"

![Select a VM Size](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/981bkn8lcr8f5z9ju1q7.png)

This displays the various sizes that can be used with the virtual machine being created. I selected the "B Series v2" list on the page as shown in the image above. This further shows a sub-list under the "B Series v2". In the image below, I selected the "B2as_V2" size option.

!["B2as_V2" size option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8xw7xm8sm95bfkagrqbd.png)

After this selection click on the "Select" button at the bottom part of the page.

![Select Button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wz68kx3yxf535ofa4de5.png)

This returns to the "Create a Virtual Machine" page. The next section of focus is the "Administrator Account".

### Administrator Account

![Administrator Account](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/55d8hcaynx6ndqy8duuq.png)

This section requires that a "username", to be used in the operating system is supplied, as well as the "password". I have set my "username" as "azureUser" and my password too.

![Administrator Account with username and password](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ors04bgiposq8zy3bs9y.png)


### Inbound port rules

In the image below, "inbound port rules" is captured in the red rectangle ("1"), and it has 2 labels namely: "Public inbound ports" and "select inbound ports". 
![Inbound port rules](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yz08hepzlusp5skp7wxu.png)

For the first label "Public inbound ports" I selected "Allow selected ports" while for the second label, I selected "RDP (3389)" from the list of options. This applies to only Windows-based Operating Systems. For Linux-based Operating Systems, "SSH(22)" applies.

### Licensing

The last label in the "Basics" Tab is "Licensing".

![Licensing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4a36klrsojivhbsvo8rd.png)

Tick the box to "confirm I have an eligible Windows 10/11 license.."


## Networking Tab
At the "Networking" Tab, scroll to the "Load balancing" section,
![Networking Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/somo2psk3df5cnptdh7q.png)
and select the "None" radio button under the "Load balancing options" label

![Load balancing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tef6uraeagufka5ynbgo.png)

## Monitoring Tab

The Monitoring Tab has 3 headings namely "Alerts", "Diagnostics" and "Health". 
![Monitoring Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sebd57wfj8wx1d6oyjxd.png)

The focus of this post is "Diagnostics" and the "Boot diagnostics" label. I selected the "Disable" radio button. 

## Tags Tab
![Tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgt0l58zh13kc39fnhi1.png)
Tags are name/value pairs that enable you to categorize resources and view consolidated billing by applying the same tag to multiple resources and resource groups.
In the image below, I wrote "Department" as the "Name" and "IT" as the "Value". In the "Resources" column, I selected "All resources".

![Name/Value selection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/js763jil5mp8hjhk2nfh.png)

## Review + create

This is the last button to select after following and applying the above-mentioned steps. "Review + create" will validate all the settings supplied and proceed to the next step in creating the "virtual machine". If there is an issue with any of the settings, an error will show up on the affected Tab(s)

![Review + create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/led0wac884866hof0l10.png)

when Azure portal is done validating all the settings provided, the page below will display "Validation Passed". After that, you can then go ahead and click the "Create" button ("2") at the bottom of the page to create the virtual machine.

![Validation complete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1j622koif2u6pc4g5qsx.png)


 Subsequently, the "create" button triggers a page showing the deployment's progress. As you can see in the image below, "Deployment is in progress" is displayed and labeled as "1".

![Deployment is in progress](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yfduopc0c9uu82avw93o.png)

At the same time "2" in the image above shows the stage of deployment of the resource "BusinessVM-1" and "BusinessVM-2".
When the deployment is successful, the page will display "Your deployment is complete" as shown in the image below.

![deployment complete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ce0511fz9o7uarviavg.png)
 
The next step is to click the "Go to resource" button on the page displayed to go to the created resource. (See below)

![Go to resource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6sjs38c3zxgqi2s9khs.png)

The next page contains details about the Virtual Machine. The virtual machine's name is displayed at the top left corner of the page. Below the name is a "search bar" and a sidebar for quick access to tools. 

![Virtual Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/md8722oxo780elf4zmd3.png)

The next step is to change the "idle timeout" of the virtual machine. On the page look for the "Essentials" panel on the right-hand side of the sidebar. Search for the "Public IP address" label as shown below,

![Public IP address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbhsnwb7b2kiplg8nlm7.png)

and click on the IP. This navigates to the "Configuration" page. The "Idle timeout(minutes)" label has a slider. By default, the idle timeout in minutes is set at 4. 

![Idle timeout(minutes)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0afiomgjouz1ch4zhn5j.png)

The desirable thing to do is to set it to the maximum to prevent the virtual machine from timing out. So the slider is dragged from the left-hand side to the right-hand side of the slider. Now the idle timeout in minutes is set to 30: the maximum timeout allowable. When this is done click on the "Save" icon at the top of the page. 

![save configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/85742q5x298vu8nxdiyi.png)

It returns to the virtual machine page. The next step is to locate the "Connect" button on the sidebar. This will connect the virtual machine after all the configurations performed earlier. 

![Connect](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pb14snmqhlchougel36w.png)

Once the "connect" button is selected, it sets the machine up for another round of validation (see image below). Under the "Native RDP" bar, the labels numbered "2" & "4" indicate the validation process. 

![configuring](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mpcqi7tchiohhk3b495l.png)

Once the validation is complete, labels "1" to "3" will display a green check mark, and label "4" will display "Configured".


![Configured](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6m1j94fcwmzdsjkubavu.png)

Once this is completed look out for label "1" in the image below and click the "Download RDP file"

![Download RDP file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8p25ifsfaklovipsl17.png)

It's 90% done if you're following these steps on a MacOS computer.
The "RDP" file is downloaded into the downloads directory on a Mac.


![RDP file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zojy1x9in85dwcta929k.jpg)


The RDP file represents the Windows 11 virtual machine that was created. To check if it works, log in using the credentials created previously. Before signing in, Mac users need to go to the App Store, download and install the Microsoft Remote Desktop app.  After installing the Microsoft Remote Desktop app, double-click the downloaded RDP file. 

![Login](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ig4h6rh7weglu9ho0tdi.jpg)

![Password](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wolrbskjsf3eq6559do9.jpg)

The dialog box will request the password created at the "Administrator Account" subheading above. 
If the correct login credentials are submitted there will be a Windows 11 starting page like below.

![starting page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbd2v6e6k4u1nnqk131d.jpg)

This is followed by a setup page below. 

![setup page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umnxc2rrgxkdjkuypj9y.jpg)

Click the "Accept" button on this page, and it displays the Windows 11 desktop.

![Windows 11 desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea7qx7y5b9nf4bemtzc3.jpg)

With all the aforementioned steps, I have created a Windows 11 virtual machine on an Azure portal.

The virtual machine runs on a free account, and if left running on the MacOS computer and the Azure portal, it may drain out the free $200 credit. So it is advised that the resource group is deleted. However, before deleting the resource group in the Azure portal, there is a need to shut down the Windows 11 virtual machine on the MacOS. Since the Windows 11 desktop is still on, it needs to be shut down properly as it is done for any physical system. The power button for the Windows 11 virtual machine is located at the bottom labeled "1" in the image below. 


![Power button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zx7axcwj0zl1n4ckasm4.jpg)

On clicking this button, a fly-out card of options appears. (see label "2" below)

![shut down fly-out](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/de1pbieq0aavssnat8gl.jpg)

From this fly-out card, the Windows 11 virtual machine on MacOS can be shut down. 

Next, the resource group should be deleted to prevent incurring charges. I went back to the Azure portal page as shown below.

![Azure resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c80l5jr17186nbdzkm41.png)

My resource group labeled "1" above is "AzureRG". Another way to locate the resource group is to search for it at the top-level search bar on the page. Click on the resource group name and it navigates to the resource group page. At the upper part of the page, there is a "Delete resource group" option.

![Delete resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hyh16s5de91cd2hxbs5p.png)

Click on the "Delete resource group" option, and a notification box on the upper right-hand of the page shows "Deleting resource group AzureRG" like in the image below.


![Delete resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6qa1pe9sg5wzedqxzy3w.png)

The process completes by showing "Deleted resource group AzureRG" in the notifications bell icon at the upper part of the page.

![Notifications](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v3o8gzp452rzgy3my6hw.png)

This post describes a high-level approach to creating a Windows 11 virtual machine on a MacOS computer. More posts on cloud DevOps with Azure will be coming up in my journey into Cloud development.