- 04 Nov 2024
- 5 Minutes to read
- Print
Virtual Machine Modifications and Differencing Disks
- Updated on 04 Nov 2024
- 5 Minutes to read
- Print
Virtual Machine Modifications and Differencing Disks
When building labs using either ESX or Hyper-V, changes saved to a Virtual Machine (VM) via the "Commit Changes" menu in the Lab Client result in Skillable Studio creating an additional disk segment. This segment contains all the changes made and is typically referred to as a Differencing Disk, Snapshot, or Checkpoint, depending on the underlying technology. At Skillable, these are referred to as Differencing Disks.
What is a Differencing Disk?
A Differencing Disk is a type of Virtual Hard Disk (VHD) used in virtual environments to store and manage changes made to another VHD, known as the parent disk. This allows the parent disk to remain unchanged while the Differencing Disk contains only the modifications. This setup is useful for tracking, storing, and restoring changes without altering the original VHD. Changes tracked by a Differencing Disk include creating new files, updating existing files, or deleting files from the virtual machine.
Skillable supports both ESX and Hyper-V, which use different file formats:
ESX: Files end with a .VMDK extension.
Hyper-V: Files end with either .VHD or .VHDX, with .VHDX being the preferred format.
How Skillable Uses Differencing Disks
When changes are committed (saved) in a VM Lab Profile using the Lab Client, Skillable Studio captures all the changes made since the Lab Profile was launched and saves them into a new VHD(X) or VMDK file. This file is then attached to the previous VM file, forming a "Disk Chain" that includes a parent disk and a child disk. As more changes are made and saved, the chain can grow, which may negatively affect performance.
Example:
Initially, an ESX VM has a single Virtual Disk (VMDK file).
After changes are saved, a second VMDK file is created to store these changes, and this file is attached to the VM.
Differencing Disk Naming Convention
In the screen shots above you will notice there is a sequence of numbers that follow the filename of the Differencing Disk, these numbers have significant meaning in this example:
141920-223704-1724069166-01.vmdk
Value | Meaning |
---|---|
141920 | Lab Profile ID |
223704 | Virtual Machine Profile ID |
1724069166 | Time Stamp in Epoch notation (Epoch Converter - Unix Timestamp Converter) |
01 | Sequence number of the differencing disk |
Editing the Disk Chain
The Virtual Disk Chain can be edited within the VM Profile on the Hard Disks page. This page allows you to:
Remove the latest Differencing Disk to undo recent changes.
Remove a Differencing Disk higher in the chain, which deletes all subsequent disks in the list since each disk in the chain depends on those preceding it.
Add a Differencing Disk to the chain, this can be very useful if you have made an update to the VM Profile in development and wish to add those changes to the Production VM profile without republishing the whole Lab Profile or Lab Series. The procedure is the same as the process for Adding a deleted differencing back into a VM Profile on the Rollback Differencing Disks page.
Note: Deleting disks from the Hard Disks page does not delete the files from Skillable storage. They can be added back if needed or permanently deleted using the Storage Manager on the Admin page.
Merging Differencing Disks
Merging of Differencing Disks
Merging consolidates multiple disk files into a single file, reducing resource consumption by the host computer, and improving the performance of the VM.
As a Differencing Disk chain grows, VM performance may degrade because the host CPUs must work harder to merge all the disk files in memory to present the correct content to the user. If performance issues arise and the disk chain is significantly long, consider merging the disk chain.
While there is no specific rule for when to merge, Skillable has found that VMs with 10-15 Differencing Disks in a single chain often will get a performance benefit from merging. The best time to consider merging is just before moving a Lab Profile to production.
To request a disk chain merge for all VMs in a Lab Profile or a specific VM Profile, place a support call with Skillable. Please note that due to the potential number and size of the disks, the process may take several days.
Best Practices
Group updates to virtual machines together to create fewer, larger Differencing Disks rather than many small ones.
When moving a Lab Profile to production contact Skillable support to merge the disks first, if the Lab Profile has over 10 differencing disks
Delete unneeded files from Storage