This guide walks you through the process of creating a Windows virtual machine (VM) in Azure using the Azure portal. Azure VMs provide on-demand, scalable computing resources. You can use a virtual machine to run applications, host websites, manage databases, and more.
Prerequisites
Before you begin, you'll need an Azure subscription. If you don't have one, create a free account before you start.
Steps to Create a Windows VM
1. Sign in to the Azure portal
Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.
2. Create a resource
On the Azure portal home page, select Create a resource.

3. Select Virtual Machine
In the search bar, type Virtual machine and select it from the results. Then, click Create.

4. Configure the Basics tab
Fill out the following information on the Basics tab:
- Subscription: Select the Azure subscription to use.
- Resource group: Choose an existing resource group or create a new one. A resource group is a logical container into which Azure resources are deployed and managed.
- Virtual machine name: Enter a unique name for your VM (e.g.,
myWinVM
). - Region: Select the Azure region where you want to deploy your VM. Choose a region close to your users or other Azure resources.
- Availability options: For this guide, we'll keep the default (No infrastructure redundancy required).
- Security type: Keep the default (Standard).
- Image: Select the desired Windows Server operating system image. You can browse for more images if needed.
- Size: Choose a VM size based on your performance and cost requirements. You can click See all sizes to explore options.
- Administrator account:
- Username: Create a username for the administrator account (e.g.,
azureuser
). - Password: Create a strong password and confirm it.
- Username: Create a username for the administrator account (e.g.,
- Inbound port rules:
- Public inbound ports: Select Allow selected ports.
- Select inbound ports: Choose RDP (3389) to allow remote desktop connections.

5. Configure Disks
On the Disks tab, you can configure the OS disk and data disks. The default settings are usually sufficient for basic scenarios. You can choose the disk type (e.g., Standard HDD, Standard SSD, Premium SSD) based on your performance needs.

6. Configure Networking
On the Networking tab, you can configure the virtual network, subnet, public IP address, and network security group (NSG). Azure automatically creates default options if you don't specify them.
- Virtual network: A new virtual network will be created by default.
- Subnet: A subnet will be created within the virtual network.
- Public IP: A new public IP address will be created, allowing you to connect to the VM over the internet.
- NIC network security group: Select Basic.
- Public inbound ports: Ensure RDP (3389) is allowed, as configured in the Basics tab.

7. Configure Management, Advanced, and Tags (Optional)
- Management: Configure options like boot diagnostics, identity, and auto-shutdown.
- Advanced: Configure extensions, custom data, and other advanced settings.
- Tags: Apply tags (key-value pairs) to organize your Azure resources.
8. Review and Create
Click Review + create. Azure will validate your configuration.

9. Deploy the VM
Once the validation passes, click Create. The deployment process can take a few minutes.
Note: The VM deployment includes creating the virtual machine, network interface, virtual network, public IP address, and network security group.
Connect to your Windows VM
After the deployment is complete:
- Navigate to your newly created VM resource in the Azure portal.
- On the VM's Overview page, click Connect.
- Select RDP.
- Download the RDP file.
- Open the downloaded RDP file and click Connect.
- Enter the username and password you created during VM setup.
- If prompted about the publisher of the remote connection, click Connect again.

Important: Ensure your local firewall or network allows RDP traffic (typically port 3389) if you encounter connection issues.
Next Steps
You have successfully created and connected to a Windows VM in Azure. Consider these next steps:
- Install applications on your VM.
- Configure security settings for your VM.
- Set up backups for your VM.
- Explore other Azure compute options.