DEV Community

Cover image for Step-by-Step Guide: Creating & Connecting to an Azure Virtual Machine
Oladimeji Zainab
Oladimeji Zainab

Posted on

Step-by-Step Guide: Creating & Connecting to an Azure Virtual Machine

Introduction

Virtual machines remain one of the most fundamental building blocks of cloud infrastructure. Whether you’re deploying applications, testing environments, hosting internal systems, or building scalable production workloads, virtual machines provide the flexibility and control needed to operate efficiently in the cloud.

In this guide, I’ll walk through a step-by-step process for creating and connecting to a Virtual Machine (VM) in Microsoft Azure. Beyond simply provisioning the resource, this post focuses on understanding the core components involved, including resource groups, networking configuration, authentication methods, and secure access.

As cloud environments continue to power modern businesses, knowing how to properly deploy and securely connect to a VM is a foundational skill for anyone pursuing Cloud Engineering, DevOps, or Infrastructure roles.

Log in to Azure Portal and Search for "Virtual Machines

Virtual Machine search

Select Virtual Machine from the Search Results

Select virtual machine

Click on "Create"

Virtual Machine original

Select the appropriate Subscription.

Virtual Machine subscription

Click "Create Resource Group" → Enter a name for it.

Createnewresource

Configure Virtual Machine Details

  • Enter VM Name (VMZEE)

VMZEE

  • Select A Region

A region

  • Select Availability Zone in the Availability Option.

Availability Zone

  • Select Zone 1 in availablity zone drop down(You can select more than one zone depending on the level of latency that is desired for your project)

Zone 1

  • spot discount(This is optional and you can use it if the project you are working on can tolerate on and off. Its most times used by the finOps engineers to reduce cost majorly for batch jobs. But for this project spot discount , I wont be using spot discount because I want my computer to be highly available

Spot Discount

  • Enter Operating System (Image option): Select windows 11

Windows 11

  • VM Size: Keep the default option.

Size

  • Set Up Administrator Account by entering the username and password

Administration account

Configure Inbound Port Rules

  • Select SSH (for Linux) or RDP (for Windows).
    Inbound port

  • Click the checkbox to accept the license agreement.

Licensing

Disable Boot Diagnostics

  • Click Next → Navigate to Monitoring Tab → Disable Boot Diagnostics.

disable diagnotics

  • Click Next → Navigate to Tags Tab → Input Tags

Review & Deploy the Virtual Machine

  • Click "Review + Create"
    Review and create

  • Ensure validation passes.

Validation

  • Click "Create" to deploy.

Create VM

  • Deployment takes 3-5 minutes.

Deployment

  • If the status is "Running", your VM is ready!

Running

Connect to the Virtual Machine

  • Click "Connect" in the Azure VM blade.

Connect

Download & Open RDP File (Windows VM Only)

  • Click "Native RDP" → Download RDP file.

RDP FILE

  • Open the RDP file on your computer.

Enter Admin Credentials

  • Enter the Username & Password created earlier.

Credentials

  • Click "Connect" to access the VM.

Connect

  • You are now connected! You can start using your Azure Virtual Machine

Virtual machine final

Conclusion

Setting up and connecting to a Virtual Machine in Microsoft Azure, a cloud platform by Microsoft, is a fundamental step in building practical cloud computing skills. Deploying virtual infrastructure in the cloud enables developers, data professionals, and cloud engineers to run applications, create development environments, and manage scalable workloads with ease.

Gaining hands-on experience with Azure Virtual Machines provides a strong foundation for exploring more advanced cloud services such as networking, storage, monitoring, and automation.

Happy building in the cloud! ☁️🚀

Top comments (0)