After exploring Azure subscriptions, resource groups, and regions, I was excited to deploy my first virtual machine (VM) in Azure. Virtual Machines are one of the most common and versatile services in Azure—perfect for hosting websites, running apps, setting up a lab, or testing scripts.
In this blog, I’ll guide you through how I deployed a virtual machine in Azure—step by step—from selecting an image to connecting via RDP or SSH.
âś… What You’ll Learn:
- What is a virtual machine in Azure?
- Key components of a VM deployment
- How I deployed my first VM in the Azure Portal
- Basic post-deployment configurations
đź’ˇ What is an Azure Virtual Machine?
An Azure Virtual Machine is a virtualized compute resource that runs in Microsoft’s data centers. Just like a physical computer, it can run Windows or Linux, and I can use it to:
- Host websites or applications
- Run development and test environments
- Build domain controllers or DNS servers
- Perform data analysis or automation tasks
It’s scalable, cost-effective, and I only pay for the compute/storage I use.
🛠️ Step-by-Step: How I Deployed My First VM
Here’s exactly how I did it using the Azure Portal:
🔹 Step 1: Go to Azure Portal
I logged in to https://portal.azure.com using my Azure account.
🔹 Step 2: Search for “Virtual Machines”
- In the search bar, I typed
Virtual Machines - Clicked Create > Azure virtual machine
🔹 Step 3: Configure Basics
| Field | My Selection |
|---|---|
| Subscription | Free Trial / Pay-As-You-Go |
| Resource Group | rg-lab-vms (or create new) |
| Virtual Machine Name | vm-test-win01 |
| Region | Central India (nearest to me) |
| Image | Windows Server 2022 Datacenter (or Ubuntu) |
| Size | Standard B1s (low-cost for testing) |
| Authentication | Password or SSH key |
| Username/Password | Custom credentials |
🔹 Step 4: Disks
- I kept the default Premium SSD
- For cost-saving, I sometimes switch to Standard HDD for test environments
🔹 Step 5: Networking
- I used the default Virtual Network and created a new Public IP
- Enabled RDP (for Windows) or SSH (for Linux) access
🔹 Step 6: Management, Monitoring & Tags
- Enabled boot diagnostics for troubleshooting
- Left auto-shutdown disabled, but I turn it on for test VMs to save costs
- Added tags like:
Environment=Test,Owner=Maharjan
🔹 Step 7: Review + Create
- Azure validated the settings
- I clicked Create and deployment started—usually takes 1–2 minutes
🖥️ Step 8: Connect to the VM
Once deployment was complete:
- For Windows VM:
I downloaded the RDP file and logged in with the username/password - For Linux VM:
I used SSH in PowerShell or VS Code with the private key
đź”§ What I Did After Deployment
- Changed the computer name
- Installed updates and essential tools (e.g., IIS, Docker, etc.)
- Took a snapshot (backup) of the VM once it was ready
- Configured NSG (Network Security Group) to allow specific ports
đź§ Tips from My Experience
- Always choose the right region for performance and compliance
- Start with B-series VMs for low-cost testing
- Enable auto-shutdown to avoid surprise bills
- Use tags for better organization and cost tracking
- Take snapshots before making big changes
🔚 Conclusion
Deploying a virtual machine in Azure was a big milestone in my cloud learning journey. It’s simple, powerful, and gives you full control—whether you’re testing a new app or setting up production infrastructure.
If you haven’t tried deploying a VM yet, I highly recommend starting today—it’s one of the best ways to learn cloud computing hands-on.