How to Create a Virtual Machine and RDp into it, install a Webserver and initialize a new usable Data Disk
Tags: webdev, azure, microsoftcloud, microservices
Published: 2023-05-17 17:17:51

**Step 1**

Go to search bar, Search and Click for Virtual Machine


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

**Step 2**

Click on Create

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

**Step 3**

**Subscription**: Select your Subscription
**Select:** or Create your Resource group
**Virtual machine:** Give Virtual machine a name (it must be a unique name)
**Region:** Select your Region (preferable east Us)
**Availability Option**: must be set at "Availability zone"
**Zone:** Click on the your Preferred zone(Zone 1)
**Security type:** standard
**img: **windows Server 2019 Datacenter x64 Gen2
**size:** Standard


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

**Step 4**

*Create a userName and passWord of your choice
*Inbound Port :Allow and choose HTTP(80) and RDP(3389)

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

**Step 5**

Select and Click on Review + Create

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

**Step 6**

Once Validation has been passed click on Create

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

**Step 7**
CLick and Select **Go to Resource**


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


**Step 8**

Select and Click on Connect

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


**Step 9**

Select and Download the RDP file

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


**Step 10**

Click and Open the downloaded file


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

**Step 11**

click and Connect to your vm windows 

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

**Step 12**

Type in your userName and Password you created in **step 4**


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

**Step 13**
Congratulations You have Successfully Create a VM and RDP into it


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



                            **Stage 2**
 "How to Install a Webserver into your VM"

**Step 1**

Go to your Vm Search bar and Search on PowerShell

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

**Step 2**

Right click and click on Run As Administrator


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

**Step 3**

Once PowerShell has been Opened type the following Cmd click on enter

> install-windowsfeature web-server


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


**Step 4**
Now Wait till  your Webserver has finished installing 

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

**Step 5**

To truly check if webServer has successfully installed 

Go to your Azure Portal on your web browser click on overview


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

**Step 6**

On the Networking area Copy the Public IP address


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


**Step 7**

open a new web Tab browser, Paste the IP address and click on enter to visit it


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


**Step 8**

Congratulations Your Webserver has successfully in Installed


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

                            **Stage 3**

How initialize a new usable Data Disk

**Step 1**

Go to your Azure Portal on your web browser click on Disk


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

**Step 2**

click on create a new disk


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

**Step 3**

Name your disk and select your preferred disk size


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

**Step 4**
Select and click on Save

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

**Step 5**

Congratulations your Disk as been successfully created 

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

**Step 6**
To initialize your disk 

go to your vM and Search on **Disk Management** and click on it 


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

**Step 7**

a pop Up windows is gonna ask to initialize the newly created DISK 2  this click on OK


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

**Step 8**
Scroll to Disk 2 and right click on it then select **"NEW Simple Volume"**


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


**Step 9**

Continue to Click on next till you get to Format Partittion

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

**Step 10**

Once you get to Format Partittion

Rename Label Volume to your preferred name and Click on Next



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

**Step 11**

Click on finish


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

**Step 12**

Congratulation you´ve Create and initialized a Disk and can now be used


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


**NOTE**: 
That will be the end Make sure to always delete Azure Resource when they are not in use