Deployment guide

Ubuntu Server 20.04

Videos

Overview: Ubuntu Server 20.04 LTS on Azure: overview (watch on YouTube)

Launch and log in: Ubuntu Server 20.04 LTS on Azure: launch and log in (watch on YouTube)

Overview

This guide shows how to deploy and configure Ubuntu Server 20.04 LTS (Focal Fossa) on Microsoft Azure. It uses SecureAnyCloud's pre-configured virtual machine image from the Azure Marketplace.

End of standard support. Canonical's standard security maintenance for Ubuntu 20.04 LTS ended in May 2025, so the free Ubuntu archive publishes no further security updates for it. For a new deployment, SecureAnyCloud also publishes Ubuntu Server 22.04 LTS and Ubuntu Server 24.04 LTS images on Azure, both inside Canonical's standard support window.

What you get:

  • Ubuntu Server 20.04 LTS (extended security maintenance requires an Ubuntu Pro subscription, which is not included)
  • Azure Linux Agent (waagent) for cloud integration
  • Chrony (chronyd) for NTP time synchronisation
  • Gen2 Hyper-V virtual machine support
  • APT package management with Ubuntu repositories
  • 24/7 SecureAnyCloud support

Platform: Microsoft Azure (Gen2 Hyper-V).

Login user: the administrator username you choose when you deploy (azureuser in the examples below). The image honours the authentication type you pick in the portal: SSH public key (recommended) or password.

Prerequisites

Before you deploy this image, make sure you have:

  • An active Microsoft Azure subscription
  • Access to the Azure Portal or Azure CLI
  • An SSH key pair (recommended) or a strong password for Linux VM access
  • Familiarity with Azure VM management

Recommended VM size: Standard_B2s (2 vCPU, 4 GB RAM) or larger.

1

Deploy the Virtual Machine

Option A: Azure Portal

  • Open the Azure Marketplace and search for "Ubuntu Server 20.04 LTS on Azure SecureAnyCloud".
  • Select the image and click Create.
  • Configure the basics: choose your Subscription, create a new Resource Group or select an existing one, enter a Virtual Machine Name, select your preferred Region, and set Size (Standard_B2s is recommended).
  • Under Administrator Account, choose the username you want to log in as. Then select SSH public key (recommended) and enter your key, or select Password and set a strong password.
  • Under Inbound Port Rules, allow SSH (port 22).
  • Click Review + Create, then Create.

Option B: Azure CLI

az vm image terms accept --urn sac1647283583153:ubuntu-20-04:default:latest
az vm create \
  --resource-group myResourceGroup \
  --name my-ubuntu-server-20-04-azure-vm \
  --image sac1647283583153:ubuntu-20-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Choosing a VM size

General-purpose, memory-optimised, compute-optimised and burstable sizes of the v5 generation and earlier run this image. Four kinds of size do not work with it:

  • NVMe-only sizes (the v6 generation, such as Dsv6, Ddsv6, Dasv6 and Easv6): this image boots from a SCSI disk controller, so Azure refuses to create it on a size that offers only NVMe ("cannot boot with OS image or disk"). Choose a v5 or earlier size instead, for example Standard_D2s_v5 or Standard_D2as_v5.
  • Confidential VM sizes (such as DCasv5, ECasv5 and their v6 successors): these need an image that supports the Confidential VM security type. This image supports the Standard security type only, not Trusted launch or Confidential VM. If your organisation's Azure Policy requires Trusted launch, Azure refuses the deployment.
  • Arm64 sizes (a p in the size name, such as Standard_D2ps_v5): this image is x64.
  • NVv4 GPU sizes (such as Standard_NV4as_v4): Microsoft supports the NVv4 AMD GPU on Windows only and retired the series on 30 September 2026, so the GPU cannot be used from Linux. For an NVIDIA GPU size, see Step 6.
2

Connect over SSH

When your VM is running, connect to it over SSH:

ssh azureuser@<public-ip-address>

To find your VM's public IP address, run:

az vm show --resource-group myResourceGroup --name my-ubuntu-server-20-04-azure-vm --show-details --query publicIps -o tsv
3

Verify the Installation

After you connect, verify the operating system:

cat /etc/os-release uname -r

Check disk space and memory:

df -h free -h

Verify that the Azure Linux Agent is running. On Ubuntu its service is named walinuxagent:

systemctl status walinuxagent
4

Update the System

Install the updates that are still published for Ubuntu 20.04. The free archive carries no new security fixes after May 2025 (see the note at the top of this guide).

sudo apt-get update && sudo apt-get upgrade -y
5

Configure the firewall (optional)

The Azure Network Security Group (NSG) controls inbound and outbound traffic. Ubuntu's own firewall, ufw, ships inactive. Check its status with:

sudo ufw status verbose

To enable it, allow SSH first so you do not lock yourself out. Then allow any other ports you need:

sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
6

Install a GPU driver (NVIDIA GPU sizes only)

The image ships without a GPU driver, so on an NVIDIA GPU size (such as the NC, ND and NV series with NVIDIA GPUs) nvidia-smi does not work until you install one. Canonical publishes prebuilt NVIDIA kernel modules for the image's Azure kernel, and ubuntu-drivers picks the right driver for your GPU. Run:

sudo apt-get update
sudo apt-get install -y ubuntu-drivers-common
sudo ubuntu-drivers list
sudo ubuntu-drivers install sudo reboot

After the reboot, run nvidia-smi to see the GPU. On a size without an NVIDIA GPU, ubuntu-drivers list prints nothing and ubuntu-drivers install has nothing to install.

ubuntu-drivers may also print an aplay error from its sound modem check. The error is harmless.

Common Use Cases

  • Web application hosting (LAMP, MEAN and MERN stacks)
  • Container and Docker workloads
  • Database hosting (MySQL, PostgreSQL, MongoDB)
  • Development and CI/CD environments

Troubleshooting

Cannot connect over SSH

  • Verify that the VM is in the Running state in the Azure Portal.
  • Check that port 22 is allowed in the Network Security Group.
  • Use the administrator username you chose at deployment (azureuser only if you kept the example) and the matching key or password.
  • Verify that your SSH key matches the one configured during deployment.

Azure agent not running

sudo systemctl start walinuxagent
sudo systemctl enable walinuxagent

Package manager issues

sudo apt-get update && sudo apt-get upgrade -y

If the repositories are unreachable, check DNS resolution:

nslookup google.com

Important Notes

Ubuntu is free and open source software. No licence is required.

Support

For help with this image, contact SecureAnyCloud support:

  • Website: secureanycloud.com
  • Product catalogue: secureanycloud.com/products
  • User guides: secureanycloud.com/guides
  • SLA: 24 hour response guaranteed

Deploy on Azure

Launch Ubuntu Server 20.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View on Marketplace

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure