Lab: VM lifecycle, disks, encryption, and moves
Outcome
Create a disposable VM through portal and CLI, attach and resize a data disk, resize the VM safely, and distinguish a same-tenant resource move from a regional migration. Test encryption-at-host eligibility without changing production data.
Do
- Create a small Linux VM in a disposable resource group through the portal; capture the validation summary, size, image, disk, NIC, and network choices. Create an equivalent second VM with Azure CLI and connect only through the approved training path.
- Create a managed data disk, attach it, initialize/mount it in the guest, create
evidence.txt, then resize the disk through the control plane and expand the guest partition/filesystem. Verify size before and after. - Stop and deallocate the CLI VM before changing its size when the selected resize requires it. Capture the size-availability result, resize to a supported test size, start it, verify workload access, then return to the original size if appropriate.
- In the same tenant, validate a move to a second training resource group and perform it only after dependency/move validation succeeds. For a different region or subscription, create an export/redeploy or replication migration plan instead; a resource-group move does not change region.
- In a separate disposable plan, check region/VM-size eligibility for encryption at host. Create the Key Vault, disk encryption set, and supported VM only if eligible. Record the unsupported-size or incompatible Azure Disk Encryption condition if encountered; do not try to enable it on a VM that currently or previously used Azure Disk Encryption.
Verify
Capture portal and CLI create evidence, disk attach/mount/resize output, deallocated/resize/start state, move validation and resource ID, and encryption-at-host eligibility/result. You should now understand: a managed disk has both Azure and guest OS steps; VM resize changes compute capacity; a move and a regional migration are different operations; encryption-at-host requires an eligible design.
Break and fix
- Try to resize a mounted disk only in Azure; diagnose the unchanged guest partition and expand it safely.
- Attempt a move with an unsupported dependency or target; read validation output, correct the plan, and revalidate instead of forcing it.
- Select an ineligible size for encryption at host; document the compatibility failure and choose a supported disposable VM rather than weakening encryption requirements.
Scenario practice
- Configure: Choose VM, disk, availability, and encryption requirements for a stateful workload.
- Diagnose: A resize fails or the OS still sees the old disk size. Which Azure state, size availability, partition, and filesystem evidence do you inspect?
- Distinguish: Contrast resource-group move, subscription move, regional migration, disk resize, and VM resize.
Clean up
Detach/delete training disks only after confirming they hold no needed evidence. Delete VMs, encryption set/Key Vault only after dependent resources are gone, and both training resource groups.
Sources and re-audit
- Encryption at host, checked 2026-08-22.
- Managed disk expansion, checked 2026-08-22.
- Move resources, checked 2026-08-22.
Re-audit when VM/disk compatibility or move support changes.
Related
azure-vm · managed-disks · vm-sizes · vm-move · vm-encryption-at-host · All labs