A developer wants to keep application data separate from the operating system so the VM can be rebuilt without losing files. Before making a risky change, the administrator also wants a fast rollback point for that data disk. Which two actions should the administrator take? Select two.
Trap 1: Use an ephemeral OS disk for the application files
An ephemeral OS disk is stored on the VM's local temp drive (SSD or NVMe) and is not backed by Azure Storage. Its contents are lost when the VM is stopped/deallocated, redeployed, or rebooted for maintenance on some instances, and it cannot hold durable application data. Using it for application files means critical state may vanish without warning, leading to application failures or data loss. Ephemeral disks are intended only for temporary caching or workloads that tolerate recreating data from an external source.
Trap 2: Keep the files only on the OS disk and rely on reimaging
Storing application data on the OS disk couples your data lifecycle to the VM image and the OS disk's health. Reimaging replaces the entire OS disk with a fresh copy from the image, erasing any files that were added or modified—including your application data—unless you had already captured them in a custom image. Additionally, if the OS disk experiences corruption or must be deleted to resize the VM, the data goes with it. This approach eliminates the isolation that Azure's data disk architecture exists to provide.
Trap 3: Delete and recreate the VM from the same image
Deleting a VM and recreating it from the same image discards the current OS disk and any attached data disks, unless you explicitly detach and preserve them beforehand. The image represents only the captured or marketplace configuration at the time it was created, so any subsequent writes, user data, or runtime state are lost forever. Merely recreating the VM does not restore the pre-change state of the data disk; it resets to the image's baseline. Without a separate backup or snapshot, this action amplifies data loss instead of protecting against it.
- A
Store the application data on a separate managed data disk
A managed data disk is an independent virtual hard disk (VHD) attached to the VM via the Azure storage subsystem. Because it sits outside the OS disk, it survives VM reimaging, resize, or even deletion of the VM itself, as long as the disk is not deleted. This separation lets you rebuild or patch the OS without touching application data, and you can independently snapshot, back up, or replicate the data disk for disaster recovery. It is the canonical Azure best practice for durability and operational flexibility.
- B
Create a snapshot of the data disk before the change
Creating a snapshot before modifying the data disk gives you a crash-consistent, point-in-time restore point. Managed disk snapshots are incremental, meaning they only capture changed blocks since the last snapshot, making them quick and cost-efficient. If the change causes corruption or unintended data loss, you can create a new managed disk from the snapshot and attach it to the VM, or even restore the original disk, minimizing downtime. This proactive safety measure is a standard pre-change control in production environments.
- C
Use an ephemeral OS disk for the application files
Why wrong: An ephemeral OS disk is stored on the VM's local temp drive (SSD or NVMe) and is not backed by Azure Storage. Its contents are lost when the VM is stopped/deallocated, redeployed, or rebooted for maintenance on some instances, and it cannot hold durable application data. Using it for application files means critical state may vanish without warning, leading to application failures or data loss. Ephemeral disks are intended only for temporary caching or workloads that tolerate recreating data from an external source.
- D
Keep the files only on the OS disk and rely on reimaging
Why wrong: Storing application data on the OS disk couples your data lifecycle to the VM image and the OS disk's health. Reimaging replaces the entire OS disk with a fresh copy from the image, erasing any files that were added or modified—including your application data—unless you had already captured them in a custom image. Additionally, if the OS disk experiences corruption or must be deleted to resize the VM, the data goes with it. This approach eliminates the isolation that Azure's data disk architecture exists to provide.
- E
Delete and recreate the VM from the same image
Why wrong: Deleting a VM and recreating it from the same image discards the current OS disk and any attached data disks, unless you explicitly detach and preserve them beforehand. The image represents only the captured or marketplace configuration at the time it was created, so any subsequent writes, user data, or runtime state are lost forever. Merely recreating the VM does not restore the pre-change state of the data disk; it resets to the image's baseline. Without a separate backup or snapshot, this action amplifies data loss instead of protecting against it.