Steps to Create a Virtual Machine in Azure Portal
Published: 2024-05-21 23:09:50

Create a free trial account in Azure ( a free trial account provides a subscription and $200 Azure credits which will be more than enough for the course ).
Login to Azure Account (portal.azure.com).To access the Azure portal, we must provide our login credentials which includes our username and password.
After login, In the "Search resources, services and docs" field, type “virtual machines”.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2narllitqrhkx8kbmac5.png)

Alternatively, you can select Virtual machine by clicking on the hamburger icon and scrolling through till we get the virtual machine.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a06m6jkzyi0kys8ct8up.png)

we can also get this by clicking on the create a resource button and typing virtual machine.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkjyzwcciw0riur3ywkm.png)

From the list of search results, click on the “Virtual machine” option.The best option would usually be grayed out.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrl0om3cmn3mw3euvtpu.png)

Click the “Create” button to start the virtual machine creation process.There is the option of two create buttons, click on either but from the options choose Create a virtual machine hosted by Azure.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9k9434ujzfdatzsqava.png)

Enter Project details this would be our subscription and resource group.Select the appropriate subscription and create a resource group by clicking the create resource group button and giving it a name or you select from an existing resource group 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b574vzhdwa8yxrxzg505.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bnbzgbu1bbopon7ihs9i.png)

Enter details about the virtual machine we’re creating. Provide information about our virtual machine, such as the name of the Virtual Machine, the operating system, size, and other configuration settings. Give the VM a name and choose either Ubuntu server 20.04 or Windows Server Datacenter -x64 G2, leave every other thing option as default.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aeiyqdz1epn8gqr4vgnq.png)

Select the region you want your virtual machine to be located 

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

Select the availability zone that you want.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0s9ka8v2m8zlsserkobx.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppaust88larj28uan91b.png)

Select more than one zone if you want the Virtual machine to be highly available. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dvt5e1drd4rscqw8rs8.png)
Go to image and select any desired Operating system 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52hot344l09osbkijbtu.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0zl6xbkzfqwcdhrswbk.png)

Create an Administrator Account. We need to a username and a password in case we need to connect to the Virtual Machine
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d0m1oj3xaa9073ffoiu7.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lw2trg0am8dtlbc7g4yl.png)

Select the inbound port rule as SSH if we selected a Linux VM and RDP if it's a windows VM. This is needed just incase we want to connect to the virtual machine as it will allow IP address to connect to the VM created.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myvsky5cz0quiv9awqiu.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nssmp1znfk3o4sn2570x.png)

Check the licensing. By default, this is unchecked, click the box to have it checked.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tbk66cjpl8rppswpz7cf.png)

Click “Next” till we get to boot diagnostics in the Monitoring tab, and click on “disable”.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gu8rncqp3pfmbrbmiq9i.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hxkql12ncnbbk44rzczr.png)

Click on “Review + Create” button, if the validation passes, the deployment will go on if not take not of any recommendation, fix and try again
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tup6vg7arv44385y0nzx.png)

Deployment of the Virtual Machine might take 3-5 minutes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5i9h4i1c3jaqdriojl70.png)

Once the virtual machine has been deployed, we can access it by clicking on the "Connect" button in the virtual machine blade in the Azure portal.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyuaytcjoqz23e46sybe.png)

Click Native RDP and click on select and wait for configured sign to be displayed on the right hand side
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9uy9pv1942l31zfw6ux.png)

Download the RDP file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1adem9icg4l6wxllob52.png)

Open the RDP file from  local computer & click on “connect”. Enter the Admin details created during the process of creating the VM. Click on the “connect” button displayed to initiate connection.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7b12bvc7ag6cczwuagu.png)

Follow the prompt and on click continue.This would be the username and passwrd created for the Admin section.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5fa38ukd30dohl48i44x.png)

Wait for the remote pc to be configured.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g18tnvrqp3af4c9xezsb.png)

Connection is successful, start using the virtual machine.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xide3qxxooshbd26b9y4.png)