MSDN Documentation
Learn | Azure

Azure Virtual Machines – Basics

Welcome to the Azure Virtual Machines (VM) basics tutorial. In this guide you will learn how to create, configure, and manage a Linux virtual machine using the Azure portal.

Prerequisites

Step 1 – Create a Virtual Machine

  1. Sign in to the Azure portal.
  2. In the left navigation pane, select Virtual machinesCreateVirtual machine.
  3. Fill out the form:
    • Subscription: Choose your subscription.
    • Resource group: Create a new group (e.g., VmBasicsRG) or select an existing one.
    • Virtual machine name: myFirstVM
    • Region: Select a region close to you.
    • Image: Choose Ubuntu Server 22.04 LTS.
    • Size: Select Standard B1s (free tier eligible).
  4. Under Administrator account, set a username and either an SSH public key or a password.
  5. Leave the default networking settings or configure a new virtual network if needed.
  6. Click Review + create, then Create.

Step 2 – Connect to Your VM

After the deployment succeeds, connect via SSH:

ssh <username>@<public-ip-address>

Step 3 – Install a Web Server

Run the following commands on your VM to install Nginx:

sudo apt update
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx

Verify by navigating to the VM's public IP address in your browser. You should see the default Nginx welcome page.

Next Steps