Create a Virtual Machine in Azure

This document provides a step-by-step guide on how to create a virtual machine (VM) in Microsoft Azure using the Azure portal.

Prerequisites

Steps to Create a 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

Navigate to Virtual machines

In the Azure portal search bar, type "Virtual machines" and select it from the results. Alternatively, click on the menu icon in the top-left corner and select "Virtual machines".

3

Create a Virtual Machine

On the Virtual machines page, click the "Create" button and then select "Virtual machine" from the dropdown.

Azure VM Create Button
4

Configure Basics

On the "Create a virtual machine" page, you will configure several tabs:

  • Project details:
    • Subscription: Select your Azure subscription.
    • Resource group: Choose an existing resource group or create a new one by clicking "Create new". A resource group is a logical container for your Azure resources.
  • Instance details:
    • Virtual machine name: Enter a unique name for your VM (e.g., my-azure-vm).
    • Region: Select the Azure region where you want to deploy your VM.
    • Availability options: Choose the desired availability for your VM.
    • Security type: Select the security type (Standard or Trusted launch).
    • Image: Select an operating system image. You can choose from various Windows and Linux distributions.
    • VM architecture: Select the architecture (x64 or Arm64).
    • Size: Choose the VM size based on your performance and cost requirements.
  • Administrator account:
    • Authentication type: Choose between SSH public key or Password.
    • Username: Provide a username for the administrator account.
    • Password/SSH public key: Enter the corresponding credentials.
  • Inbound port rules:
    • Public inbound ports: Select which ports to allow inbound traffic to. Common choices are RDP (3389) for Windows or SSH (22) for Linux.
5

Configure Disks

In the "Disks" tab:

  • OS disk type: Choose the performance tier for your OS disk (e.g., Premium SSD, Standard SSD, Standard HDD).
  • Data disks: You can attach additional data disks to your VM if needed.
6

Configure Networking

In the "Networking" tab:

  • Virtual network: Select or create a virtual network for your VM.
  • Subnet: Choose a subnet within the virtual network.
  • Public IP: Select whether to create a new public IP address or use an existing one.
  • NIC network security group: Configure network security group rules to control inbound and outbound traffic.
7

Configure Management, Advanced, and Tags (Optional)

Review and configure settings in the "Management", "Advanced", and "Tags" tabs as needed. These include monitoring, auto-shutdown, extensions, and metadata tags.

8

Review and Create

On the "Review + create" tab, Azure will validate your configuration. Once validation passes, review the summary of your VM settings and click "Create" to begin the deployment.

Note: VM creation typically takes a few minutes. You can monitor the deployment progress in the Azure portal notifications.
9

Connect to your VM

Once the deployment is complete, navigate to your VM's resource page. You will find connection details, including the public IP address and instructions on how to connect using RDP (for Windows) or SSH (for Linux).

Tip: For Windows VMs, you can download the RDP file directly from the VM overview page. For Linux VMs, use an SSH client with the public IP address and your credentials.