Virtual machines, scale sets and availability sets
Compute is the processing power that runs your applications. The most flexible compute option in Azure is the virtual machine.
Azure Virtual Machines
A virtual machine (VM) is a software emulation of a physical computer, with its own operating system (Windows or Linux), CPU, memory and disks. VMs are IaaS: you control and maintain the operating system and everything installed on it.
Use VMs when you need:
- total control over the operating system,
- to run custom or legacy software,
- a quick way to lift and shift existing servers to the cloud,
- test and development environments.
What a VM needs
When you create a VM, Azure creates or connects several resources:
- the VM itself, with a chosen size (CPU and memory),
- a disk for the operating system (and optional data disks),
- a virtual network and subnet to connect to,
- a network interface (NIC),
- optionally a public IP address and a network security group.
You also choose an image (the operating system to start from, such as Windows Server or Ubuntu) and a size, which you can change later by resizing. When a VM is stopped (deallocated) you stop paying for its compute, but its disks are still billed.
Virtual Machine Scale Sets
A scale set lets you create and manage a group of identical, load-balanced VMs. The number of VMs can increase or decrease automatically based on demand or a schedule. Use scale sets for large-scale services such as web front ends, where you want horizontal scaling without managing each VM.
Availability sets
An availability set keeps VMs running during hardware failures and planned maintenance by spreading them across:
- Fault domains: groups of servers that share power and network, like a rack. By default the VMs are split across up to three fault domains, so one rack failing never takes them all down.
- Update domains: groups that are rebooted together during planned maintenance. Only one update domain is updated at a time, and each gets time to recover before the next starts.
There is no extra charge for an availability set; you pay only for the VMs in it. Availability sets protect against failures within a data centre. Availability zones protect against the loss of a whole data centre.
Azure Virtual Desktop
Azure Virtual Desktop delivers Windows desktops and applications from the cloud to any device. Users sign in from anywhere, while the desktops run in Azure. It supports multi-session Windows (many users on one VM) and centralised security, because data stays in the cloud rather than on the device.