How to create a virtual machine in Azure.
Published: 2022-10-29 18:20:58

What is a virtual machine ?
It is a computer system created using software on one physical computer in order to emulate the functionality of another separate physical computer.

**WINDOWS VM**
STEP 1 : Navigate through your resource group and locate your virtual machine and click on it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kdu9k4x73rd3jtuayemu.png)

STEP 2 : click on the plus sign to create a vm
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbtq807tw6y0bqzyvaox.png)

STEP 3 :
- select your resource group or you could create new for your vm 
- give your vm a name and give it password, follow the instructions required in giving names and password 
- select region 
- select numbers of availability zones you need.
- select security type, for me i use the default given.
- select image for windows, i work with windows server 2019 data center Gen 2 
-  select administrator account, give a name also and give password to it . p.s follow the requirements in giving names and password 
- select public inbound ports and click on allow selected ports 
- select RDP and HTTP 
Then next you select disks

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


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

STEP 4 : Use all default requirements under disks features 


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

- next to networking 

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

- next to management use default settings

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

- Next to monitoring, under diagnostics, disable boot diagnostic .

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

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

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

- next to tags 

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

Step 5 : Review

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

- review validation passed

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

Step 6 : create your vm 

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

- deployment in progress 

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

- go back to resource 

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

Step 7 : connect using RDP 

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

Step 8 : download rdp file 

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

- open downloaded rdp file 

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

- enter username and password created then connect 

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8oimcjull1ug23k93kdb.png)
 
step 9 : windows rdp fully deplyed 

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

step 10 : on your rdp search for power shell and run as an administrator 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bbh1jhuwl3di4buunynw.png) 
 
input"install-WindowsFeature Web-Server" into your powershell and run it 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rcaf30s2fw1nypdv243g.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5c9j61sfmi2btu5dekbk.png)
 
Step 11- head back to your azure portal and copy your ip and search url 

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

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