How to Create a Virtual Machine on MacOS
Tags: devops, azure, virtualmachine, macos
Published: 2023-05-19 19:58:14

## **Introduction**
In this blog, I will walk you through the step-by-step process of how to set up a virtual machine on a macOS.

First off, **What is a Virtual Machine?**
A Virtual Machine (VM) is a software emulation of a physical computer. It includes virtual processors, memory, storage and networking. In other words, It has everything a physical computer would have.
Now that you know what a Virtual Machine is, let'

## **Steps to Create A Virtual Machine**
Log in to [Azure Portal](https://portal.azure.com/#home) or Sign up [here](https://azure.microsoft.com/en-us/free/) if you don't have an account.
![Interface of the Azure Portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y8c2lratnyq05u5vmklj.png)This is how your Azure Portal would look like once logged in.

You can either click on the search bar and search for virtual machines or click on **Create a resource**
![Resource interface highlighting virtual machine and other services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mitd7eq6hun5bzbsqxc3.png)

Fill the form that pops up. Let's start with creating a resource group by clicking on the **Create new**
![Creating a resource group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9em47ihevg4jm2zuetwc.png)The name of a resource group can be random, so I decided to call mine **Practice**.

Then proceed to give the Virtual Machine a name, select a region, Choose an Image and leave the other fields with the default recommendation.
![Creating a virtual machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myn3udk8rz3se3mc75hh.png)
- I named my virtual machine as **pracvm**, but you can name yours anything.
Next is to set a username and password
![Setting Administrative access](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abp30gc1p4pxxcxzic0m.png)
You can optionally configure disks, network, etc. on the next pages. Proceed to click on **Review + create**.

The **Review + create** tab should open with some information about your virtual machine and a green checkmark. Proceed and click **Create**
![Review + create interface](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ry9hzmyutkefiwxkodz.png)

Wait for it to finish deploying and your virtual machine would be created.

Voila, your VM has been created! Click on **Go to resource**
![Virtual Machine created](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ykuwwqr029sv4bh7hrkw.png)

Next, go to app store and install **Microsoft Remote Desktop**
![Microsoft Remote Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azyz102n4rg62xxjcvtw.png)I already have it installed that's why mine is showing **OPEN**. If you don't have it installed it's going to show **GET**. I will go ahead and click on **OPEN**.
![Microsoft Remote Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgeojejola5z6mvb1l1y.png)You should have a similar interface but yours should be empty. Click on the plus button and then **Add PC**.

A dialogue box should appear. Fill the box and click on **Add** button.
![Add PC box](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tkkfjtv5sdti84kkozh.png)

- To get the **_PC name_**, go to virtual machine you created earlier, copy the **_Public IP address_** and paste it.

- **Friendly name** is optional. You can give yours any name.

Next, Double click on the newly added PC. It should prompt you to enter a username and password.
The username and password should be the same you used in creating your virtual machine. Then click on **Continue**.
![username and password used in creating the virtual machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jtvmz1pyv3k4sggpj28.png)
Congrats! You did it.
![Windows Virtual Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8sikateil685i68sqlji.png)
Always delete any resources created on Azure whenever you are completely done with them to save cost.

I hope you enjoyed the journey as much as I did.

Connect with me
LinkedIn: https://www.linkedin.com/in/chisom-amadi/
GitHub: https://github.com/tchisom17