Create Your First Windows Virtual Machine in Azure
This guide walks you through the essential steps to create and connect to a Windows virtual machine (VM) in Azure using the Azure portal.
Prerequisites
Before you begin, ensure you have:
- An Azure subscription. If you don't have one, you can create a free account.
Step 1: Create a Virtual Machine
Sign in to the Azure portal
Open your web browser and navigate to https://portal.azure.com/. Sign in with your Azure account credentials.
Navigate to Virtual Machines
In the Azure portal search bar, type Virtual machines and select it from the results.
Start the VM creation process
On the Virtual machines page, select Create and then choose Virtual machine.
Configure the Basics tab
Fill in the following details:
- Subscription: Select your Azure subscription.
- Resource group: Click Create new and enter a name (e.g.,
MyVMResourceGroup
). - Virtual machine name: Enter a unique name for your VM (e.g.,
MyWindowsVM
). - Region: Choose an Azure region close to you.
- Availability options: For this quickstart, select No infrastructure redundancy required.
- Security type: Keep the default (Standard).
- Image: Select Windows Server 2022 Datacenter: Azure Edition or another desired Windows Server image.
- Size: Choose a VM size. For testing,
Standard_B1s
is often cost-effective. - Administrator account:
- Username: Enter a username for the administrator (e.g.,
azureuser
). - Password: Enter a strong password and confirm it.
- Username: Enter a username for the administrator (e.g.,
- Inbound port rules: For Public inbound ports, select Allow selected ports. Then, for Select inbound ports, choose RDP (3389). This allows you to connect to the VM.
Note: Opening RDP to the internet is suitable for testing but not recommended for production environments. Consider using Azure Bastion or a VPN for secure connections.
Configure Disks, Networking, and Management
For this quickstart, you can accept the default settings for the Disks, Networking, and Management tabs. Review them briefly to understand the options, such as OS disk type, virtual network, and public IP address.
Review and Create
On the Review + create tab, Azure will validate your configuration. Once validation passes, click Create.
The deployment process will take a few minutes. You can monitor the progress on the deployment page.
Step 2: Connect to Your Virtual Machine
Get the Public IP Address
Once the deployment is complete, navigate back to the Virtual machines page and select your newly created VM (e.g., MyWindowsVM
).
On the VM's Overview page, find the Public IP address and copy it.
Use Remote Desktop Connection
Open the Remote Desktop Connection application on your Windows computer (search for "Remote Desktop Connection" in the Start menu).
In the Computer field, paste the public IP address you copied. Click Connect.
Sign in to the VM
When prompted for credentials, click More choices, then Use a different account.
Enter the username and password you created in Step 1 (e.g., azureuser
and your password).
You might see a certificate warning. This is normal because the certificate is self-signed. Click Yes to proceed.
Congratulations!
You have successfully created a Windows virtual machine in Azure and connected to it using Remote Desktop. You can now install applications, configure settings, and use it as needed.