HOW TO DEPLOY A WINDOWS VM, RDP INTO IT AND ADD A DATA DISK TO THE WINDOWS VM ON A MACBOOK
Published: 2023-05-05 20:13:06


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

Azure Virtual Machines are image service instances that provide on-demand and scalable computing resources with usage-based pricing.

More broadly, a virtual machine behaves like a server: It's a computer within a computer that provides the user the same experience they would have on the host operating system itself. In general, virtual machines are sandboxed from the rest of the system, meaning that the software inside a virtual machine can’t escape or tamper with the underlying server itself.

Each virtual machine provides its own virtual hardware including CPUs, memory, hard drives, network interfaces, and other devices. (Source: microsoft.com)

**RDP(Remote Desktop)** enables you to access the desktop of a role running in Azure. You can use a Remote Desktop connection to troubleshoot and diagnose problems with your application while it is running.

**A data disk** is a managed disk that's attached to a virtual machine to store application data, or other data you need to keep.


Step 1:

Visit portal.azure.com, login or sign up if you don't have an account, you can get a free account at azure.microsoft.com/en-us/free/

Step 2:

Click on Virtual Machines to create or search from the search bar.

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

Step 3:

1. Subscription: Choose the subscription where you wish to create the resource.
2. Resource group: Choose the resource group where you wish to create the resource. If you wish to create a new group click on create a new option.
3. Virtual Machine name: Enter a preferred unique name.
4. Region: Select the location where you wish to create the account.
5. Image: Choose windows because we're creating a windows VM.
6. Username: azureuser
7. Password: Password12345
8. Select inbound ports: HTTP(80), RDP(3389)
Click on Review and Create

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

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

Step 4:
After validation is passed, click on Create

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

Step 5:
Your virtual machine has been created so Click on Go to Resource

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

Step 6:
1. Click on the IP address to increase the time out to 30 minutes.
2. Click on Connect.

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

Step 7:
1. Choose RDP
2. Click on download RDP file
3. I chose to save on my desktop for easy access

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

Step 8:
Click on the downloaded file and open it. Type in the username and password used in Step 3 and click on continue.

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

Step 9:
Your windows virtual machine has been created!

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

Step 10:
On the virtual machine search bar, search for Powershell and click on it to install a webserver on it.

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

Step 11:
Once your Windows Powershell comes up, type in the command - Install-WindowsFeature Web-Server and click enter.(please note that the command is case sensitive).
 As simple as ABC, Your webserver hs been successfully installed!

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

Step 12:
Go back to where you stopped on your azure portal and click on overview to copy the public IP address of your VM that was created.

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

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

Step 13:
Paste the public IP address of the VM in a new tab to test if your web server is up and running.

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

Step 14:
To add a disk, click on "disks"
1. Click on "create and attach a new disk"
2. Choose a data disk name
3. Change to 10gb
Click on save

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

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

Step 15:
Go back to the VM you created, Search and Click on create and format hard disk partitions

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

Step 16:
Once it comes up, to initialize the disk, click on ok and then scroll down to disk 2 since that was what we selected. Right click on it, then click on "new simple volume"

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

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

Step 17:
Keep going with the defaults till you get to "format partiton". Change the volume label to the name of your data disk - i chose "toludatadisk" earlier. Click on next and then finish.

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

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

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

Congratulations!!! All the requirements of your Virtual Machine has been fulfilled and its ready to be used...

Thank you for reading...