When an image is not trimmed
Virtual Disk Trim trims an image only when it can be certain which blocks are free. When it cannot, it leaves the image alone and states the reason in the Status column. The full explanation appears when you mouse-hover over the row. Simple reasons, such as “Not enough space” require no explanation. More complex reasons are described below:
| Status | Meaning | What to do |
|---|---|---|
| In use | Another program, usually the hypervisor, has the disk open. | Shut the virtual machine down and close the program using the disk. |
| Not shut down cleanly | The guest file system was not closed properly, so its record of free space may be out of date. | Start the virtual machine and then shut it down normally. Do not suspend, hibernate or power it off. |
| Busy in the guest | An operation such as a resize or a conversion was under way inside the guest. | Start the virtual machine, let the operation finish and then shut down. |
| Snapshot or differencing disk | The disk depends on a parent disk, has snapshots or a saved state. | Delete or merge the snapshots in the hypervisor, then trim the resulting disk. Do not trim the base disk underneath while snapshots exist: it is not recognised as one. |
| Encrypted | The image file itself is encrypted. | An encrypted image cannot be trimmed. An encrypted volume inside an ordinary image is a different case, see below. |
| Format not supported | A variant of the format the application does not handle, such as a compressed qcow2 or a stream-optimised VMDK. | Convert the image to a plain variant with the hypervisor’s own tool, for example qemu-img convert. |
| Part of the disk is missing | A piece of a split disk is absent, or a volume group extends over another disk. | Bring the missing files back beside the others. |
| Not a disk image | The content of the file is not what its name says, or it is one piece of a split disk. | For a split VMware disk, add the descriptor file and not one of the pieces. |
| Damaged or inconsistent | The image or a file system in it failed a consistency check. | Check the disk with the hypervisor’s tool and the file system inside the guest, for example with chkdsk or fsck. |
| Cannot be saved this way | The destination cannot hold the result, for example a file over 4 GB on FAT32, or a raw image on a disk without sparse files. Also shown for an image marked read-only on Windows, which is never replaced. | Save copies to a disk with a suitable file system. For a read-only image, clear the mark or save a copy. |
| Verification failed | The trimmed image did not match the original. It was discarded and the original was left unchanged. | Try again. If it repeats, check the host disk and memory. Contact our support if your checks cannot determine the culprit. |
Volumes left as they are
A reason can also apply to a single volume while the rest of the disk is trimmed. Such a volume is copied whole and shows Left as it is followed by File system not recognised, Kept as it is or one of the reasons above. It is not a cause for concern; it simply means that this volume’s free space stays in the image.
An encrypted volume is the common case. It is marked Encrypted, and as its contents cannot be read without the key, it is copied without change. The guest will unlock it afterwards exactly as before. A BitLocker volume marked Locked: needs a password can be unlocked and trimmed.