When you create or edit a virtual machine’s disk in VMware ESXi, you encounter a Disk Mode setting with options like Dependent, Independent–Persistent, or Independent–Nonpersistent. Understanding these modes is critical for managing snapshot behavior, data protection, and performance in your virtual environment.
Changing these modes fundamentally alters how the virtual disk interacts with the hypervisor’s snapshot mechanism and whether changes to the disk persist after a VM reset3.
Disk Modes Explained
VMware ESXi offers three disk mode options, which determine whether a disk participates in VM snapshots and how disk changes are saved.
1. Dependent Mode (The Default)
This is the standard and most common mode for virtual disks.
- Snapshot Behavior: A Dependent disk is fully included in VM snapshots.
- Data Persistence: When you revert the VM to a snapshot, the disk’s state reverts to the snapshot point, losing any subsequent changes. Deleting a snapshot consolidates the delta changes back into the base disk.
- Best Use: Most general-purpose virtual disks, OS disks, and application disks where you need to capture their state as part of a VM snapshot for backup or versioning.
- Key Insight: This mode is essential for ensuring that snapshot revert/delete operations affect the disk, along with the rest of the VM, thereby maintaining a consistent whole-VM state.
2. Independent–Persistent
An Independent–Persistent disk is excluded from snapshots but always preserves changes permanently.
- Snapshot Behavior: The disk is skipped entirely when a VM snapshot is taken.
- Data Persistence: All writes go directly to the disk on storage. If you revert the VM to an earlier snapshot, this disk stays at its current state and does not revert. Deleting snapshots has no effect on this disk.
- Best Use: Disks storing transaction logs, analytics data, or high-IO data that must always remain current regardless of VM snapshot activity.
- The Critical Warning: This mode often breaks image-based backups. Most backup solutions rely on the snapshot mechanism; bypassing it means this disk must be backed up using an in-guest agent or external means.
3. Independent–Nonpersistent
An Independent–Nonpersistent disk is a special mode where disk changes are not saved permanently.
- Snapshot Behavior: Like Independent–Persistent, this disk is excluded from snapshots.
- Data Persistence: Changes are stored in a temporary redo-log. If you power off or reset the VM via the hypervisor, the delta is discarded, and the disk returns to its original state, erasing all temporary changes.
- Best Use: Throwaway test environments, sandbox VMs, or training VMs where you want all changes to be rolled back automatically upon shutting down the VM.
- The “Reboot” Trap: Simply rebooting the guest OS (a soft reboot) will not discard changes, as the VM remains running in the same session. You must power-cycle the VM (Power Off/On or Reset via the hypervisor) to reset the disk.
Disk Mode Configuration
Before changing a virtual disk’s mode, ensure the VM is powered off and that no active snapshots exist.
Using the vSphere Client (HTML5 Web UI)
This method is used when managing the VM through vCenter Server or the embedded host client.
- Navigate to the VM, right-click, and choose Edit Settings.
- Expand the Hard disk section.
- In the Disk Mode dropdown, select the desired option (Dependent, Independent-Persistent, or Independent-Nonpersistent), then save the changes.
Using VMware PowerCLI
PowerCLI provides a command-line method useful for automation and batch changes.
1. Connect to the ESXi host or vCenter using the Connect-VIServer cmdlet.
Identify the disk you want to modify using Get-HardDisk. Note that in PowerCLI output, a Dependent disk is listed as “Persistent”, while the Independent modes use their full, contiguous names (“IndependentPersistent” or “IndependentNonPersistent”).
2. Change the disk mode using the Set-HardDisk cmdlet with the -Persistence parameter.
3. Example: To set the third disk (index [2]) of a VM to Dependent mode:
PS C:\> (Get-HardDisk -VM "Name_of_VM")[2] | Set-HardDisk -Persistence "Persistent" -Confirm:$false
Example: To set a disk to Independent–Nonpersistent mode, use “IndependentNonPersistent” for the -Persistence value.
4. Verify the change by running Get-HardDisk again.
5. Disconnect the session using Disconnect-VIServer.
Summary of Use Cases
| Disk Mode | Snapshot Inclusion | Persistence | Primary Use Case | Critical Caveat |
|---|---|---|---|---|
| Dependent | Yes | Always saves changes | General-purpose disks; OS drives; where backups rely on snapshots. | Excessive snapshots can impact performance and storage. |
| Independent–Persistent | No | Always saves changes | High-I/O logs, database transaction data, or specific data that must not revert with a VM snapshot. | Breaks most image-based backup solutions (e.g., Veeam) for this disk. |
| Independent–Nonpersistent | No | Changes are discarded upon power cycle | Testing, training, or sandbox environments where you need a quick, automatic rollback. | Changes are not discarded by an in-guest OS soft reboot; only by a hypervisor Power Off/Reset. |
Conclusion
Dependent mode remains the safe default for most environments because it ensures full compatibility with snapshot-based backup solutions and maintenance workflows. Independent-Persistent mode is powerful for specific high-IO or quorum scenarios, but it requires a separate backup strategy since it bypasses the snapshot mechanism entirely. Finally, Independent-Nonpersistent offers a quick, self-cleaning sandbox for testing, provided you remember to fully power cycle the VM to reset the state. Always verify that no snapshots exist before attempting to change a disk’s mode to avoid configuration conflicts.