Creating a Virtual Machine (VM) in Microsoft Azure may seem daunting at first, but with the right guidance, it’s straightforward and practical. In this step-by-step tutorial and video, we’ll walk through how to set up your first Azure VM, configure it properly, and connect using Remote Desktop (RDP) on Windows. This guide is perfect for beginners and covers the fundamentals, including cost-saving strategies and best practices.
Why Create a Virtual Machine in Azure?
Azure Virtual Machines allow you to run Windows or Linux servers in the cloud without investing in physical hardware. They are essential for testing, development, running applications, or even hosting services. Learning how to create and manage VMs is a key skill for anyone working with Microsoft Azure or cloud computing in general.
Step 1: Create the Virtual Machine
1. Go to the Azure Portal and search for Virtual Machines.
2. Click Create a Virtual Machine.

3. Select your subscription and create a new resource group (e.g., DemoVMRG).
4. Give your VM a name (e.g., DemoVM) and select the region closest to you.
5. Choose your availability options, security type, and OS image (Windows or Linux).

All Azure resources created in this tutorial are placed into the same resource group. Think of a resource group as a container for all your Azure resources. Using resource groups helps organize resources with the same lifecycle and allows you to manage permissions using role-based access control (RBAC).
Tip: Use the Azure Pricing Calculator to check costs for your chosen OS and VM size. This helps you plan and avoid unexpected charges.
Step 2: Choose VM Size and Disk Options
– VM Size: Options like B-series (burstable) or D-series (general purpose) impact both performance and cost. For a simple lab Azure virtual machine, a B2ls_V2 with 2 vCPU and 4 GB RAM is sufficient.
– Disk: Azure offers Premium SSD, Standard SSD, or Standard HDD. Each with a different performance profiles and cost. The standard SSD strikes a good balance between performance and cost for this tutorial.

Step 3: Configure Networking
Each VM needs:
– A virtual network (VNet)
– A network interface card (NIC)
– A public IP address for RDP access (optional)
For quick deployments, you can use default networking options. For production, create a separate VNet to improve security and organization.
Step 4: Enable Auto-Shutdown
To save costs, enable auto-shutdown for your Azure virtual machine. This ensures the VM is deallocated at a scheduled time, stopping charges for compute resources.

Important: Shutting down from inside the OS does not stop Azure billing—always deallocate from the portal, PowerShell, or CLI.
Step 5: Deploy the VM and Connect via RDP
1. Review your configuration and click Create.
2. Once the VM is deployed, go to the VM overview page and click Connect → RDP.
3. Download the RDP file, open it, and enter the credentials you set during VM creation.
4. Congratulations! You’re now logged into your Azure VM.
Step 6: Remove the VM When Finished
To avoid ongoing charges:
1. Navigate to the resource group containing your virtual machine.
2. Delete the resource group to remove the Azure virtual machine and all associated resources.
Tips and Best Practices
– Use the Azure Pricing Calculator to estimate costs before deployment.
– Consider Azure Hybrid Benefit if you have existing Windows Server licenses.
– For dev/test environments, spot instances can save money but may be interrupted.
– Always monitor and deallocate unused VMs to avoid unnecessary charges.
Conclusion
Creating an Azure Virtual Machine is a foundational skill for IT professionals, cloud enthusiasts, and beginners exploring Microsoft Azure. By following these step-by-step instructions, you can confidently set up, manage, and remove virtual machines while keeping costs under control.
Whether for learning, development, or production workloads, mastering Azure virtual machines is a key step toward cloud proficiency.
Links:
A Beginner’s Guide to the AZ-900
https://www.udemy.com/course/beginners-guide-az-900/?referralCode=C74C266B74E837F86969
Zero to Hero with Azure Virtual Desktop
https://www.udemy.com/course/zero-to-hero-with-windows-virtual-desktop/?referralCode=B2FE49E6FCEE7A7EA8D4
Hybrid Identity with Windows AD and Azure AD
https://www.udemy.com/course/hybrid-identity-and-azure-active-directory/?referralCode=7F62C4C6FD05C73ACCC3
Windows 365 Enterprise and Intune Management
https://www.udemy.com/course/windows-365-enterprise-and-intune-management/?referralCode=4A1ED105341D0AA20D2E
Azure Pricing Calculator
https://azure.microsoft.com/en-us/pricing/calculator/