Creating Virtual Machine on Azure Portal
Tags: virtualmachine, azure
Published: 2022-06-29 15:57:10

## What is Virtual Machine?
Virtual machine is a virtual environment over your a system. Assume you have a Linux OS on your system, but you want to use Windows for some specific functionality, but you don't want to install it over your system. What you can do is, just create a VM (Virtual Machine) with Windows OS and use in whatever way you want virtually over your system.
So basically, a virtual machine (VM) is a virtual environment that functions as a virtual computer system with its own CPU, memory, network interface, and storage, created on a physical hardware system.

So, let's create a VM on Azure.

Move to the [Azure Portal](https://portal.azure.com), and tap on the + icon with text **_Create a resource_**.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wrgcfp80j55m2iv0ukvw.png) 

You will get similar interface show below. Choose the **_Virtual machine_** from the given option.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n7f9rppanbbnax0h267d.png)

This interface will open up.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vkdv7ooqdtqtc71o45r1.png)

Let's now examine each option given.

Let the **_Subscription_** be as it is. And in **_Resource group_**, let's create a new one using the **_Create new_** option shown in blue below the input bar.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3f02sfsiypuml979crk.png)
I am creating a Resource group named as **_VM_RG_**.

Now the question arise that, **What is a Resource group?**
So, a resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group.

The time to give our Virtual Machine a name.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hli64oyn8kke4h31uryz.png)

- In the **_Virtual machine name_**, I am giving the VM a name as **_VMonPortal_**. 
- Under **_Region_**, choose the region which is nearest to you. I am choose the region as **_Central India_** as it's nearest to me.
- Keep the **_Availability option_** as **_No infrastructure redundance required_**.
- Let the **_Security type_** remain as **_Standard_**.
- Under **_Image_** choose the operating system which you want in your virtual machine. I am choosing **_Windows 11 Pro_**.
- Leave the **_Azure Spot instance_** as unchecked.
- Under **_Size_**, choose the size which suites your pocket. I am choosing the lowest one, i.e, **_Standard_D2s_v3_**.

Time to set the username and password of our VM.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/km32fkqed0ss56nmofsb.png)
You can see that there are some criteria related to the username and password, so choose the username and password accordingly.
And do remember this username and password, because this will help you to signin to your VM.

Leave the **_Inbound port rules section_** as it is.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zq1guo26jfxiw2k3j5td.png)

Check mark the licensing confirmation.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/151owlxypw0byhkozdnh.png)

Now your interface should look similar to this, with similar values.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p58mpylpfgax1uhtc62a.png)

Now tap on **Next: Disks >** button below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1y5w6bm8s1qiw1zvbinr.png)

Now this interface will open up which basically ask for the data disks you want in your VM.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2wxnv07y9wuoje08ono0.png)

I am keeping the **_OS disk type_** as **_Standard SSD_**, leaving the other items same.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wconlbow15yf4zrdlffc.png)

If you want you add a data disk, but I am not adding any, leaving the other items as it is.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xdw5ogqy0qm70gvmy5h.png)

Now tap on the **Next: Networking >** tab below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5ahkdbj2wisxym10m9l.png)

I am keeping all the items as it is, in the **_Networking_** tab.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxtuc7qarndl5lhti1x7.png)

Now directly tap on **Review + Create** button below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2gw6ozc6ut9l068zrt9.png)

The _Review + create_ tab will open up with some information and costing of your VM.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/houebr4kmqnpfoj4vz6x.png)

Now just tap on the **Create** button below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8lagazrer96vbwloka1.png)
This will create the VM with the configurations you mentioned.
The creation process may take some time.

This kind of message can come up on your screen that the deployment is complete.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2dvt2vmco409r2847ph.png)

Now tap on **Go to resource** button.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51iuou7rjce5uvzu01fz.png)

The portal for the virtual machine will open up.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce5l4w8ybimwk6onfsf4.png)

Awesome!!
We just now created our Virtual Machine on Azure Portal.

But wait!!!!
How to use the Virtual Machine now.

Let's see how we can start our Virtual Machine.


You can see this bar.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i0cx4uprv63ht9oo6qse.png)

Here you have the option of **Connect**. So, you need to tap on the arrow with **Connect** and choose the **RDP** option from the dropdown menu.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwtdevn9j5yj4pvcb9em.png)

**_Connect with RDP_** interface will open up, and now we need to download the RDP file using the **Download RDP File** button.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zotogxgw5wgafu0q3p3k.png)

Now in your downloads folder, you can see a .rdp file with the name of your VM.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgu7gh09cghf0tii3cq3.png)
Just open that file.

**Remote Desktop Connection** interface will open up, and you need to tap on the **Connect** button to connect to your VM.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/snatkouau2hda742rw72.png)

**Windows Security** interface will open up. But you need to tap on **_More choices_** option given below. And there you need to choose **_Use a different account option_**.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zeejz805nl16iynb7de.png)

Now on the new interface, you need to add the username and password which you set while creating the VM. And then tap on **OK** button below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/igerlouh5cwk9oed6nmu.png)

If this kind of interface comes up, just tap **Yes** below.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdeoh1utq310aee1cnoy.png)

Now you can see the Virtual Machine is opening up.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/214fo8lwcxjraunz8anf.png)
You can enlarge the VM and make it full screen and use it like your own system.

Yayy!
Now finally you have created your own Virtual Machine on Azure Portal and used it too.

Enjoy your new system 🎉