Lesson 1 of 4 Securing Virtual Machines

Understanding VM Security and Trusted Launch

This lesson explains the customer's responsibility for a VM, and how the security type protects the boot process.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the elements of a hardened VM.
  • Explain why boot-level attacks are serious.
  • Describe Secure Boot, vTPM and integrity monitoring.
  • Distinguish Trusted Launch from confidential VMs.

What the customer owns

A VM is infrastructure as a service, so the customer has far more to do than with a PaaS service. Microsoft secures the physical host and hypervisor. The customer is responsible for the guest operating system, its patches, its software, its accounts, and the network paths to it. This module and the next cover the controls, as the following summary of a hardened VM shows.

  • No public IP address, with access through Azure Bastion.
  • Management ports closed, opened only with just-in-time access.
  • Trusted Launch to protect the boot chain.
  • Encryption at host to protect disks, temporary disks and caches.
  • A managed identity with least privilege, in place of stored credentials.
  • Defender for Servers for EDR and vulnerability management.
  • Azure Update Manager for patching, and Azure Machine Configuration for settings in the guest.

Boot-level attacks

Some of the most persistent malware runs before the operating system starts. A rootkit or bootkit replaces part of the boot chain, so it loads first and can hide from anything that runs later, including antivirus software. Reinstalling applications does not remove it. Protection has to start below the operating system, at the virtual firmware.

Azure addresses this with the VM's security type. The following comparison shows the options.

Standard
Boot protectionNone beyond the platform
GenerationGen1 or Gen2
Protects data in useNo
CostNo extra charge
Choose when Unsupported images or sizes
Trusted Launch
Boot protectionSecure Boot, vTPM and integrity monitoring
GenerationGen2
Protects data in useNo
CostNo extra charge
Choose when The default for almost all new VMs
Confidential
Boot protectionAs Trusted Launch, in hardware-based trusted execution
GenerationGen2
Protects data in useYes, from the host
CostSpecific VM sizes
Choose when Highly sensitive workloads that must be isolated from the host
Sort into groups

Which security type?

Exam skills 3.2.8

Choose the VM security type for each requirement.

Log in to try this activity Interactive activities are free with an account.

The Trusted Launch components

Trusted Launch is the default security type for newly created Gen2 VMs and scale sets. The portal, Azure CLI and Azure PowerShell default to it. Through the API from version 2025-11-01, it is enabled by default if the image, disk and VM size all support it, and otherwise the VM is deployed without it. To opt out, set securityType to Standard. Three features work together.

FeatureWhat it doesWhat happens on failure
Secure BootAllows only signed operating system boot components and drivers to loadThe VM fails to boot
Virtual Trusted Platform Module (vTPM)A virtual TPM 2.0 device that stores keys and measurements, and supports remote attestationMeasurements do not match the expected state
Boot integrity monitoringUses attestation to check the boot chain, and reports to Defender for CloudA medium-severity alert

Boot integrity monitoring needs Secure Boot, vTPM and the Guest Attestation extension. Attestation fails if Secure Boot is disabled. Defender for Cloud gives low-severity recommendations to enable Secure Boot, vTPM and the extension where they are missing, and a medium-severity alert on an attestation failure.

Match the pairs

Trusted Launch features

Exam skills 3.2.8

Match each Trusted Launch feature with what it does.

Log in to try this activity Interactive activities are free with an account.

Limits and compatibility

Trusted Launch has limits. It needs a Gen2 image and a supported VM size, and it cannot use a managed image, so use an Azure Compute Gallery image instead. Linux VM hibernation is unsupported. After a VM has been defaulted to Trusted Launch, it cannot be resized to an unsupported family such as the M-series, without deallocating it and setting the type to Standard with a client other than the portal.

Secure Boot can also block legitimate unsigned kernel modules, such as some third-party drivers or custom Linux kernels. If a workload needs them, either sign the components or leave Secure Boot off for that VM, knowing that attestation will then fail. Consider this before rolling out to a fleet.

The following command creates a Trusted Launch VM with Secure Boot and vTPM stated explicitly, and adds no public address. It sets a managed identity as well.

az vm create --resource-group RG --name VM --image Ubuntu2404 --size Standard_D2s_v5 \
  --security-type TrustedLaunch --enable-secure-boot true --enable-vtpm true \
  --public-ip-address "" --assign-identity --generate-ssh-keys
True or false

Trusted Launch limits

Exam skills 3.2.8

Check the limits of Trusted Launch.

Log in to try this activity Interactive activities are free with an account.

Confidential VMs

Confidential VMs protect data while it is in use, using hardware such as AMD SEV-SNP or Intel TDX. Memory is encrypted with keys that the host cannot reach, so even a host administrator cannot read it. They suit regulated data or multi-party scenarios, and they come with specific VM sizes and more constraints than Trusted Launch. For this exam, remember the distinction: Trusted Launch protects the boot chain, whereas a confidential VM protects memory from the host.

Worked example

Failed attestation

A new Gen2 VM uses Trusted Launch, with Secure Boot on and vTPM on, but Defender for Cloud reports that boot integrity is not being monitored. What is missing, and what would happen if someone later installs an unsigned driver?

Monitoring needs the Guest Attestation extension, which is the missing piece. Install it, or use the Defender for Cloud recommendation, or an Azure Policy that deploys it across a fleet.

An unsigned boot driver would be stopped by Secure Boot, and if it were a boot component, then the VM could fail to start. Disabling Secure Boot to get past this would cause attestation to fail, as it depends on Secure Boot. A better response is to obtain a signed driver.

Check yourself

What happens to a Trusted Launch VM if its boot loader is unsigned?

Show answer

Secure Boot stops it from loading, so the VM fails to boot.

Exam Tips

Remember for the exam

  • Trusted Launch is the default for new Gen2 VMs.
  • Boot integrity monitoring needs Secure Boot, vTPM and the Guest Attestation extension.
  • Trusted Launch cannot use managed images.
  • Trusted Launch protects boot; confidential VMs protect memory from the host.