Creating a virtual machine on Azure Portal and connecting to it using Remote desktop.
Published: 2023-01-20 15:08:07

A virtual machine is a digital emulation of a physical computer. it comes complete with a desired operating system, stores data, run programs and can connect to networks. Basically it can do what any physical computer can do.
With azure, you can create a virtual machine and connect to it using the remote desktop app on your physical computer. This involves two parts.

Part 1: Creating a virtual machine on the azure portal. This can be done in the following steps;

Step1: log in to your azure portal. if you do not have one, you can start with an azure free account here https://azure.microsoft.com/en-us/free/.
Step2:type Virtual machine into the search box on the home page and select virtual machine from the drop-down options.

![Virtual machine options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydsae1dtc3es2agkwoeu.png)
Step3: select create virtual machine and  chose virtual machine on the drop-down options. This takes you to the setup page for your virtual machine.

![Virtual machine options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vrsrrxg5qp23y4qhqt25.png)
Step4: supply the information as needed.

**Subscription**: the azure subscription your default directory belongs to has already been selected. you can change this if you have another subscription
**Resource group**: input a name for the resources group for the virtual machine.

![Resource group and subscription](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5o3t6hqlri4u3knhz2z.png)
**Virtual Machine Name**: input a name for your virtual machine
**Region**: select a region where the virtual machine will be located
**Availability option**: no infrastructure redundancy required.
security type: standard
**Image**: select the base operating system you prefer.
**VM architecture**: Select the one that supports the image you chose above

![setting up the VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9f6474rj24012092jpt.png)
**size** : select a size that can support your workload
**Username**: input desired username
**Password**: input desired password
**Confirm password**: confirm password

![Setting up the VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5nvsuuq3mg2jxp4l3cui.png)
**Public inbound ports**: allow selected ports
**Select inbound ports** : RDP (3389)


![Selecting inbpound ports](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upz5mjdyxjumkgpl2rof.png)
Step 5: check the licensing box
step6: select Review + Create


![setting up the VM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4sdkhipsosfywwbiunmi.png)
The portal will run a validation process to check if all required information is provided.
After it returns a validation passed, select create to create your virtual machine.

![validation passed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbdg9o7fj9f5ne75lnbm.png)
The virtual machine will start the deployment process.
![Deployment in progress](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26u5us9tz2jqy7f9fjvz.png)
Once the deployment is complete, your virtual machine is reday for use.

![deployment successful](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kd5gaqbsj4b07lbg9xm0.png)

Part 2: Connecting to your virtual machine using Remote desktop

After the virtual machine deployment as completed, select go to resource. This will take you to the overview page of the virtual machine you just created.

Select connect and chose RDP from the drop-down option.

Select download RDP file, (this will download a file named RDP onto your computer.)
![download RDP file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxbtq55z3v9bdgb285jx.png)

Locate and Open the RDP file.

Select connect.

Input your Virtual machine username and password.

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

It will prompt you that the certificate is not from a trusted authority, select yes to connect.

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

It will load up your virtual machine.
You have successfully connect to your virtual machine using Remote Desktop.

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

You can also connect to the virtual machine without download the RDP file.

Copy the public IP address of your virtual machine.

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

Type Remote Desktop into your PC search box. Open the remote desktop
![Remote Desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcx4ao0621b8ymny9s3j.png)

Paste the public Ip address you copied into the space provided and select connect.

![paste IP](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/agt4xjbw3i9phj8wcczj.png)

Input your Username and password and select connect.

It will prompt you that the certificate is not from a trusted authority, select yes to connect.

It will load up your virtual machine.
you have successfully connect to your virtual machine using Remote Desktop.

Note: The resource group is a container that houses all your Azure Resources.

Please leave a feedback.