Domain 3 — Module 5 of 8 63%
19 of 28 overall
Domain 3: Secure compute Free ⏱ ~13 min read

VM Security: Disk Encryption, Bastion, JIT, Secure Boot, vTPM, Machine Config

How to harden Azure VMs end-to-end: full-disk encryption (PMK/CMK and confidential disks), Azure Bastion for safe RDP/SSH, just-in-time VM access, Trusted Launch with secure boot and virtual TPM, and Azure Machine Configuration for in-guest enforcement.

VM hardening in one module

Simple explanation

Azure VMs are still the workhorse for plenty of production systems — and SC-500 expects you to lock them down end-to-end. Five controls show up over and over on the exam:

  1. Disk encryption — every disk encrypted at rest, using platform-managed keys by default and customer-managed keys (CMK) or confidential disks for higher-assurance scenarios.
  2. Azure Bastion — the managed jump-host that lets admins RDP/SSH into VMs through the Azure portal over TLS, with no public IP on the VMs themselves.
  3. Just-in-time (JIT) VM access — VMs are not reachable on management ports until an admin requests time-bounded access; the NSG opens for the configured port for the configured duration.
  4. Trusted Launch features — secure boot (firmware verifies the OS bootloader), virtual TPM (a vTPM device for in-guest attestation and key sealing), and integrity monitoring (detection of boot-time tampering). Combined under the VM “security type” setting.
  5. Azure Machine Configuration — Azure Policy’s in-guest configuration extension: define desired OS configurations (e.g. “Windows password policy at least 14 chars”, “TLS 1.2 minimum”) and have Azure audit or enforce them across hundreds of VMs.

Disk encryption — three flavours to know

Disk encryption options on Azure — pick by assurance level and key custody requirements
Encryption typeWhere keys liveBest for
Platform-managed keys (PMK)Microsoft-managed inside AzureDefault — covers all managed disks at rest with zero configuration
Customer-managed keys (CMK) via Key VaultCustomer Key Vault (Standard or Premium HSM); rotation by customerRegulated workloads requiring CMK; central key control via Key Vault rotation policy
Encryption at hostPlatform-managed or CMK; encryption happens on the host hypervisor before data reaches storageWhen you also need to encrypt the ephemeral cache, temp disk, and intra-VM volumes — full coverage including cache that PMK alone misses
Azure Disk Encryption (ADE)In-guest BitLocker (Windows) or DM-Crypt (Linux), keys in Key VaultLegacy compatibility; new deployments prefer host-side encryption + CMK
Confidential disks (on confidential VMs)Keys bound to the TEE (TPM-backed); cannot leave the encrypted environmentConfidential VM workloads where encryption-in-use is required

For SC-500, the most-tested combination is CMK + encryption at host for regulated environments where the customer must own the key AND the encryption must extend to the host-level cache.

Azure Bastion — kill the public IP on management ports

The “before Bastion” pattern: VMs have public IPs, RDP/SSH ports open to the internet (or to a corporate VPN range), and admins connect directly. Every public IP is a target for brute-force and credential-stuffing scanners.

The “with Bastion” pattern:

  • VMs have no public IPs.
  • Azure Bastion is deployed in a dedicated AzureBastionSubnet in the VNet.
  • Admins connect via the Azure portal (or the Bastion-native client) over TLS to Bastion; Bastion establishes the RDP/SSH session to the VM over the VNet.
  • NSG rules allow Bastion → VM management ports; nothing else can reach those ports.

Bastion SKUs

  • Developer — for dev/test, single-VM, single-region; not for production
  • Basic — production-grade RDP/SSH from portal
  • Standard — adds native client support, host scaling, IP-based connection, peer VNet connectivity, custom port configurations
  • Premium — adds session recording, private-only Bastion (no public IP on Bastion itself, accessible via Private Endpoint), and other regulated-environment features

For SC-500, know that Premium is the SKU when you need session recording and a Bastion that doesn’t itself have a public IP.

Just-in-time (JIT) VM access

JIT is a Microsoft Defender for Cloud (Defender for Servers plan) feature. With JIT:

  • Management ports (3389, 22) on covered VMs are closed by default in the NSG.
  • An authorised user requests access via Defender for Cloud (or the JIT API), specifying:
    • Which port(s) to open
    • How long (typical 3 hours, up to 24)
    • Source IP (their current IP)
  • Defender for Cloud verifies RBAC and (configurable) Conditional Access, then adds a time-bounded NSG rule allowing the request.
  • When the time expires, the rule is removed automatically.
  • Every request is audited with user, source IP, duration, port, justification.

JIT requires Defender for Servers

JIT is a Defender for Servers Plan 2 feature (Plan 1 doesn’t include it). The covered VMs must be onboarded to Defender for Cloud, which uses Microsoft Defender for Endpoint integration on the VM where applicable.

Trusted Launch and confidential VMs

Trusted Launch is a Generation-2-VM security profile that ships three boot-time integrity features:

  • Secure boot — UEFI firmware validates the boot loader and kernel signatures against Microsoft (or platform) signing keys before booting. Rejects unsigned or untrusted boot components.
  • Virtual TPM (vTPM) — virtualised TPM 2.0 device. Allows in-guest attestation, key sealing, BitLocker autounlock, Microsoft Defender for Endpoint sensor enrolment with verified boot integrity.
  • Integrity monitoring — when Defender for Servers is enabled, deviations in boot-time integrity raise alerts in Defender for Cloud.

These are surfaced as the VM’s security type setting: Standard (none), Trusted launch virtual machines (secure boot + vTPM + integrity monitoring), or Confidential virtual machines (Trusted Launch + hardware-based TEE encryption-in-use via AMD SEV-SNP or Intel TDX).

When 'Trusted Launch' is the right exam answer

SC-500 questions that hint at:

  • “Detect changes to the boot loader / kernel”
  • “Detect bootkit / rootkit installation”
  • “Verify integrity at boot”
  • “Bind BitLocker key release to a verified boot”

…are pointing at Trusted Launch — specifically the virtual TPM and integrity monitoring combination. If the question further specifies encryption-in-use against the hypervisor / Microsoft operator, escalate the answer to Confidential VM.

Wrong answers often suggest Defender for Servers alone or guest agents — Defender extends the detection surface, but the underlying boot-integrity primitives are Trusted Launch features that must be enabled on the VM’s security type at deployment (or by re-imaging for some configurations).

Azure Machine Configuration — in-guest enforcement

Azure Machine Configuration is the in-guest configuration management built into Azure Policy. It can:

  • Audit an in-guest configuration (e.g. “Windows password policy minimum length is at least 14”) and report compliance per VM.
  • Configure (“DeployIfNotExists” pattern but for guest OS) — apply the configuration to non-compliant VMs.
  • Cover Windows and Linux, both Azure-native VMs and Azure Arc-enabled servers (on-prem and other clouds).

Built-in policy definitions cover common Microsoft Cloud Security Benchmark (MCSB) in-guest controls. Custom Machine Configuration packages can extend coverage to your own configurations (delivered as PowerShell DSC v3 modules).

For SC-500, Azure Machine Configuration is the “how do I enforce in-guest settings consistently across a fleet” answer.

Scenario: Asha hardens Aurora’s regulated VM fleet

Aurora Health Service has ~120 VMs hosting hospital information systems across two regions. Asha’s hardening plan:

  1. Disk encryption — every VM uses encryption at host with customer-managed keys in a regional Key Vault (Premium tier, HSM-backed). CMK rotation policy: annual auto-rotation with 30-day grace.
  2. No public IPs on VMs, full stop. All admin access via Azure Bastion (Premium SKU) for session recording and private-only Bastion endpoint. Bastion subnet AzureBastionSubnet per VNet, peered to all spoke VNets.
  3. JIT VM access enabled via Defender for Servers Plan 2 on all 120 VMs. Default JIT policy: 3389 (Windows) and 22 (Linux) closed by default; max activation 3 hours; requires JIT-Admin RBAC role + CA-required compliant device.
  4. Trusted Launch + Trusted launch virtual machines security type on all VMs. Confidential VMs (AMD SEV-SNP) for the patient-records workloads where encryption-in-use is required (~15 VMs).
  5. Azure Machine Configuration assignments at the management group:
    • Built-in initiative Audit Windows machines on which the password policy doesn’t meet requirements — apply-mode auto-remediation.
    • Built-in initiative Audit Windows machines that don’t have the specified Windows PowerShell execution policy — audit, alert.
    • Custom DSC v3 module enforcing the hospital’s required TLS 1.2-minimum on outbound HTTPS clients.
  6. Defender for Servers Plan 2 on the subscription enables JIT + integrity monitoring + Defender for Endpoint integration + agentless scanning of the VM disks (next module).

After rollout: zero public IPs on VMs, every admin session is recorded, JIT auditable per-request, disks encrypted with rotating CMKs, boot integrity validated, in-guest configurations enforced and audited.

Key terms

Question

What is 'encryption at host' for Azure VMs?

Click or press Enter to reveal answer

Answer

A disk encryption mode where the host hypervisor performs encryption before data reaches Azure Storage — covering OS disk, data disks, AND ephemeral cache + temp disk. Standard Azure managed-disk encryption covers only the OS/data disk at rest in Storage, leaving cache unencrypted. Encryption at host can use platform-managed or customer-managed keys (CMK) via Key Vault.

Click to flip back

Question

What is Azure Bastion and when do you need the Premium SKU?

Click or press Enter to reveal answer

Answer

A managed jump-host PaaS that provides RDP/SSH connectivity to Azure VMs over the Azure portal (or native client) via TLS, without VMs needing public IPs or open management ports to the internet. Standard SKU adds native client, IP-based connection, port customisation. Premium SKU adds session recording and private-only Bastion (no public IP on Bastion itself, reachable via Private Endpoint).

Click to flip back

Question

What is just-in-time (JIT) VM access?

Click or press Enter to reveal answer

Answer

A Microsoft Defender for Cloud (Defender for Servers Plan 2) feature that keeps VM management ports closed by default. Authorised users request time-bounded access via Defender for Cloud or the JIT API; an NSG rule is opened for the configured port, duration, and source IP, and removed automatically on expiry. Every request is audited.

Click to flip back

Question

What does Trusted Launch include?

Click or press Enter to reveal answer

Answer

A Generation-2-VM security profile combining: secure boot (UEFI firmware validates the boot loader and kernel against signed firmware policies), virtual TPM (vTPM 2.0 device for in-guest attestation and key sealing), and integrity monitoring (with Defender for Servers — alerts on boot-time integrity violations). Surfaced as the VM 'security type' = Trusted launch virtual machines.

Click to flip back

Question

What is Azure Machine Configuration?

Click or press Enter to reveal answer

Answer

The in-guest configuration management built into Azure Policy. Uses PowerShell DSC v3 to audit or apply configurations across Windows and Linux VMs (Azure-native and Azure Arc-enabled). Built-in policies cover MCSB in-guest controls; custom DSC v3 packages extend to org-specific requirements. The 'enforce in-guest settings consistently across a fleet' answer on SC-500.

Click to flip back

Knowledge check

Knowledge Check

Asha at Aurora Health Service must encrypt both the OS/data disks AND the ephemeral cache on all hospital-information-system VMs, using a customer-managed key in Key Vault that the security team rotates annually. Which disk encryption configuration meets all three requirements?

Knowledge Check

Esme at Northwind Bank wants to eliminate all public IPs on production VMs but admins still need RDP/SSH for break-glass operations — and the security team requires session recording for compliance. Which combination fits?

Knowledge Check

Ravi at Maple Genomics is deploying a workload that processes raw patient genomic data on Azure VMs and must be protected from privileged host operators AND from the Azure hypervisor itself (encryption in use, not just at rest). Which VM security type should he select?

What’s next

Next module: Defender for Servers + Azure Arc — how to extend the Defender protections we just configured (JIT, integrity monitoring, agentless scanning) to hybrid and multicloud servers via Azure Arc. This is where Asha’s on-prem and AWS estates join the same security pipeline as her Azure-native VMs.