DEV Community

Cover image for Deploying a Windows VM on Azure with RDP and Data Disk Setup
Oluwanifesimi
Oluwanifesimi

Posted on

Deploying a Windows VM on Azure with RDP and Data Disk Setup

What Is an Azure Virtual Machine?

An Azure VM is a scalable, on-demand computing resource that behaves like a physical computer but runs in the cloud. It allows you to run operating systems (Windows, Linux, etc.), install software, and host applications without managing physical hardware

Key Features

  • Full Control: You get administrative access to the OS and can configure it as needed.
  • Flexible OS Choices: Choose from pre-configured images like Windows Server, Ubuntu, Red Hat, or upload your own custom image.
  • Scalability: Easily scale up or down based on demand using auto-scaling features.
  • Availability Zones: Deploy across multiple zones for high availability and disaster recovery.
  • Security: Use Network Security Groups (NSGs), firewalls, and encryption to protect your VM

Use Cases

  • Development & Testing: Quickly spin up environments tailored to your app’s needs.
  • Web Hosting: Host websites or APIs with full control over the server stack.
  • Data Processing: Run compute-heavy tasks like simulations, analytics, or machine learning.
  • Legacy App Support: Run older applications that require specific OS versions or configurations.

Aim Objectives:

  • Provision a Windows 10 VM in Azure
  • Assign access permissions securely using Role-Based Access Control (RBAC)
  • Attach and format an additional data disk
  • Access your VM using RDP and perform disk management tasks

Step 1: Create a Virtual Machine on Azure

  • Log in to the Azure Portal. Login
  • In the top search bar, type Virtual Machines and select it. select vm Click + Create → Virtual machine. create vm VM

Step 2: Configure the Basics

  • Under Resource group, click Create new and name it TestRG. create RG
  • Give your VM a name, e.g., TestVM.
  • Select a Region close to your users or workload.
  • Choose Availability Zone if required for resilience.
  • Under Image, select Windows 10. BASIC
  • Choose a Username, e.g., NKVM, and create a Password (confirm it).
  • Under Inbound port rules, allow RDP (for remote access). You may also enable HTTP, HTTPS, or custom ports as needed.
  • Tick the Licensing box to confirm usage rights. Basic settings Step 3: Configure Monitoring and Tags
  • Go to the Monitoring tab.
  • Disable Boot diagnostics** to reduce startup logs for now (optional for testing).
    montoring

  • Under the Tags tab, add the following key-value pairs:

Department: HR
Purpose: Hire
Staff: Nifemi
Tags
These tags help track costs and usage across your organization.

Step 4: Review and Create

  • Click Review + Create.
  • Wait for validation to pass, then click Create.
    wait validation

  • Once deployment finishes, click Go to resource
    finish deployment
    Step 5: Assign Access Control (IAM) Roles
    To allow specific users to log into the VM:

  • On the VM resource, go to Access Control (IAM).

  • Click + Add → Add role assignment.
    add role management

  • In the Role field, search and select Virtual Machine Administrator Login.

  • Click Next.
    IAM

  • Under Members, click + Select members, choose users to add, then click Select.
    memeber

  • Click Review + assign to finalize.
    review and assign

Step 6: Configure Idle Timeout for IP Address

  • In the VM’s Overview pane, click on the IP Address.
    IP Address

  • Under Configuration, increase the Idle timeout (minutes) to 30.

  • Click Save.
    timeout

Step 7: Attach and Format a New Data Disk
Adding a second disk improves storage flexibility for files or application data.

  • In the VM menu, select Disks.
  • Click + Create and attach a new disk.
    create new disk

  • Enter a name, e.g., Nifemi-disk.

  • Click Apply.
    Apply

Once created, we’ll connect to the VM and format this disk.

Step 8: Connect to the VM via RDP

  • Go to Overview.
  • Click Connect → RDP
    connect rdp

  • Download the .rdp file.
    RDP

  • Open the file and connect.
    OPEN FILE

  • Enter the VM username and password you created earlier.
    RDP USERNAME/PASSWORD

home page

  • Accept all certificates and login prompts. Congratulations! You now have access to a fully functioning Windows 10 virtual machine.

Step 9: Format the Data Disk from Inside the VM

  • Inside the VM, search for Disk Management.
  • Open Create and format hard disk partitions.
    disk management

  • Find Disk 2 (this is your newly attached disk).

  • Right-click on the disk space and select New Simple Volume.
    disk
    disk 2

  • Follow the wizard: Click Next, assign a letter, and Finish.
    follow wizkid

  • You now have a new drive ready to store files.
    New Drive

Conclusion
Provisioning a Virtual Machine on Azure is more than just spinning up a server—it’s about unlocking a flexible, secure, and scalable environment tailored to your specific needs. Whether you're building a test lab, hosting a web app, or managing enterprise workloads, Azure VMs offer the control and customization developers crave, without the overhead of physical infrastructure.

By walking through the full setup—from creating the VM to configuring access and formatting disks—you’ve now got a solid foundation to build on. Cloud computing is no longer the future—it’s the now. And with Azure VMs, you’re right at the center of it.

Top comments (0)