Quickstart: Create a Windows Virtual Machine in Azure

This guide will walk you through the steps to create a basic Windows Virtual Machine (VM) in Azure using the Azure portal. Virtual machines are on-demand, scalable computing resources that you can use like a physical computer.

Tip: You can create Azure VMs using the Azure portal, Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates. This quickstart focuses on the portal for ease of use.

Prerequisites

Before you begin, you need an Azure subscription. If you don't have one, you can create a free account.

Step 1: Sign in to the Azure portal

Sign In
  1. Open your web browser and go to the Azure portal.
  2. Sign in with your Azure account credentials.

Step 2: Create a Virtual Machine

Initiate VM Creation

From the Azure portal home page, select Create a resource.

Azure portal create resource button

Figure 1: Azure portal home page with "Create a resource" highlighted.

Select Virtual Machine
  1. In the Search services and marketplace bar, type Virtual machine and select it from the results.
  2. Click Create.
Configure Basics

On the Create a virtual machine page, under the Basics tab, do the following:

Azure VM basics configuration

Figure 2: Basic configuration for a new Azure VM.

Configure Disks

Under the Disks tab, you can configure storage. For this quickstart, the default settings are fine. You can choose different OS disk types (e.g., Premium SSD, Standard SSD, Standard HDD) based on your performance and cost needs.

Configure Networking

Under the Networking tab, you can configure virtual networks, subnets, and public IP addresses. For this quickstart, the defaults are acceptable. A new virtual network, subnet, and public IP address will be created.

Note: Ensure that RDP (port 3389) is allowed in the network security group (NSG) that will be created. This is typically handled by the inbound port rules selected in the Basics tab.
Review and Create
  1. Click on the Review + create tab.
  2. Azure will validate your configuration. If validation passes, review the summary of your VM settings.
  3. Click Create.

The deployment of your VM will take a few minutes. You can monitor the deployment progress in the portal.

Step 3: Connect to the Virtual Machine

Get Public IP Address

Once the deployment is complete, navigate to your virtual machine resource in the Azure portal.

On the Overview page, find the Public IP address and copy it.

Azure VM overview showing public IP address

Figure 3: VM Overview page displaying the Public IP address.

Connect via RDP
  1. Open your Remote Desktop Connection client on your local computer.
  2. In the Computer field, paste the public IP address of your VM.
  3. Click Connect.
  4. You may see a warning about the identity of the remote computer. Click Yes to continue.
  5. When prompted for credentials, click More choices, then Use a different account.
  6. Enter the username and password you created in Step 2 (e.g., azureuser and your password).
  7. Click OK.

You should now be connected to your Windows virtual machine in Azure.

Step 4: Clean up resources

When you are finished with your virtual machine, you can delete the resource group to remove the VM and all associated resources.

Delete Resource Group
  1. In the Azure portal, navigate to Resource groups.
  2. Select the resource group you created (e.g., myResourceGroup).
  3. Click Delete resource group.
  4. Confirm the deletion by typing the resource group name and clicking Delete.

Next Steps

You have successfully created and connected to a Windows VM in Azure. Consider exploring other Azure services or learning how to:

Explore More Tutorials