Archive · Azure

Azure Basics: Virtual Networks and Virtual Machines

Create a VNet, a subnet and a Linux VM, and understand network security groups.

1 min read

  • Azure Virtual Network
  • Azure VM
  • NSG
  • Ubuntu 22.04 LTS

A virtual network (VNet) is a private address space in one region, divided into subnets. A network security group (NSG) filters traffic by priority-ordered rules and can attach to a subnet or a network interface.

In the portal: Create a resource, Virtual machine, then choose:

Setting Sensible start
Image Ubuntu Server 22.04 LTS
Size Standard_B2s for light work
Authentication SSH public key
Inbound ports SSH (22), restricted to your IP afterwards
Disk Standard SSD
ssh azureuser@<public-ip>

Notes for AWS users:

  • Outbound internet access is allowed by default; there is no separate NAT step for simple cases.
  • Disks and public IPs are separate resources and keep billing when a VM is only stopped inside the OS. Use Stop (deallocate) in the portal to end compute charges.
  • Use Azure Bastion or a just-in-time access policy instead of leaving SSH open.

Set a budget under Cost Management before creating anything else.