Virtual Machines

Virtual machines offer the ability to lift and shift on-premises resources into Azure.

Disks

Disks come into two variants. Unmanaged disks are page blobs in storage accounts, manually managed independently of the VM. Managed disks are the recommended approach, allowing you to set and forget storage without having to consider storage account IOPS limits, managing access or replication topologies. It's possible to convert unmanaged disks to managed disks. We pay for pre-allocated storage.

Snapshots are full, read-only copies of a managed disk.

Images are generalised VM disk images to be used as base images, and can be created from snapshots.

Availability sets

Ensuring machines are failure-resistant by deploying them across different fault and update domains:

  • Fault domains have redundant power, cooling, and networking.
  • Update domains ensure that VMs aren't taken offline by installation of updates at the same time.

Availability zones combine both domains to offer a 99.99% SLA.

Scale sets

Scale sets allow managing multiple templated virtual machines as if they were a single resource. It's still possible to peek behind the curtain and modify them individually, but be wary that changes are likely to be lost when the VMSS next deploys the VM.

Capturing library images

Generalised base images can be used to avoid repetitive and error-prone deployment processes. To generalise a running operating image:

  • On Windows, run sysprep.
  • On Linux, run sudo waagent -deprovision+user.

Upon completion, navigate to the VM in the Azure Portal and initiate a VM capture. Note that this consumes the running VM to create the library image, and it's worth taking a snapshot of its disk to reduce restore time if the operation isn't successful.

The generates custom images are region- and subscription-bound and cannot be shared with other users; see Shared Image Galleries for this use case.

Monitoring

There are many options for monitoring VMs within Azure:

  • The IaaS Monitoring VM extension pushes data into Azure Monitor.
  • There are many extensions for installing Azure Monitor Log (formerly Log Analytics).
  • Hybrid cloud with SCOM.

Troubleshooting

Enabling Boot Diagnostics makes two panes accessible under the VM blade:

  • Boot diagnostics provides periodic screenshots of the VM console.
  • Serial console provides access to the VM via the serial console, allowing access to the serial console or SAC (Windows).

Children
  1. Extensions

Backlinks