DEV Community

Toluwani Oluwaloseyi
Toluwani Oluwaloseyi

Posted on

HOW TO DEPLOY A WINDOWS VM, RDP INTO IT AND ADD A DATA DISK TO THE WINDOWS VM ON A MACBOOK

Image description

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

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

Image description

Step 4:
After validation is passed, click on Create

Image description

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

Image description

Step 6:

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

Image description

Step 7:

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

Image description

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

Step 9:
Your windows virtual machine has been created!

Image description

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

Image description

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

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

Image description

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

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

Image description

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

Image description

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

Image description

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

Image description

Image description

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

Thank you for reading...

Top comments (0)