Thin vs thick provisioning on vSphere was a per-disk choice about two things: when the datastore hands over a disk’s space, and when the old data in that space is zeroed. On Red Hat® OpenShift® Virtualization and upstream KubeVirt, that one choice splits up. The storage behind the StorageClass decides allocation, and the Containerized Data Importer (CDI) can preallocate a disk’s space when it writes the disk. Whatever space a thick disk held for you becomes limits you set on namespaces, pools and the cluster.
On VMware® vSphere, administrators picked Thin, Thick Provision Lazy Zeroed or Thick Provision Eager Zeroed for every VMDK. This post covers the decision behind that choice and sorts each disk into a path on the destination. What replaces vmkfstools -j, -k and -K is in vmkfstools on Kubernetes.
What thin vs thick provisioning bought you on vSphere
Broadcom’s knowledge base article on the virtual disk types ESXi supports defines the three formats the vSphere Client offers:
- Thin Provision: space is not allocated when the disk is created. It is supplied and zeroed on demand, later.
- Thick Provision Lazy Zeroed, the default on VMFS datastores: space is allocated when the disk is created. Old data on the device is zeroed on demand at the first write from the VM, and the VM never reads stale data. On NFS datastores, Broadcom notes that disks are thin by default.
- Thick Provision Eager Zeroed: space is allocated and zeroed when the disk is created, which can take much longer than the other formats.
Behind those two things, allocation timing and zeroing, sat two more: a reservation and overcommit. A thin disk took space only as the guest wrote data. A thick disk took its full size out of the datastore at creation, so growth in other VMs could not take it later. Zeroing before the first write was the one thing eager zeroed added over lazy zeroed. Thin disks also brought overcommit: Broadcom’s article on thin provisioned disks says thin provisioning lets you over-allocate storage, and that thin disks can grow to fill an entire datastore if left unchecked.
Before you plan the destination, separate disks that were thick by decision from disks that were thick by default. Because lazy zeroed was the default, many thick disks in an estate never reflected a requirement. Eager zeroed was required for some features. Broadcom states that application clustering, including Microsoft Windows Server Failover Cluster (WSFC), and VMware Fault Tolerance need eagerzeroedthick disks (KB 342229). For shared disks in multi-writer mode, Broadcom calls eager-zeroed thick a strict requirement, and ESXi refuses to open thin or lazy-zeroed disks in that mode (KB 410765).
Where each concern is decided on Kubernetes
On Kubernetes, each of those is decided in a different place. A PersistentVolumeClaim (PVC) asks for a size, an access mode, a volume mode and a StorageClass, and nothing in it names a disk format.
Allocation timing belongs to the storage. The CSI driver behind the StorageClass provisions the volume. Whether that volume is thin-provisioned or thick is a behavior of that storage, sometimes exposed as a StorageClass parameter. The KubeVirt user guide allows for both kinds: it describes PVC annotations containing /storage.thick-provisioned or /storage.preallocation, set to true, that mark a disk as thick or preallocated.
Preallocation is a CDI option. CDI preallocates a DataVolume when you set preallocation: true in its spec. The same setting in the spec.config of the CDI resource applies it to every DataVolume, and it is off by default. Upstream CDI fills blank block volumes with zeros. For imports, uploads and blank images it uses the qemu-img preallocation option, falloc where available and full otherwise. Red Hat’s OpenShift 4.22 Virtualization documentation gives the purpose as improving write performance, and says fallocate allocates blocks and marks them as uninitialized. Preallocation is the closest equivalent of eager zeroed, but it does not always write zeros.
The reservation has no per-disk equivalent. On thin storage, a PVC request does not set physical capacity aside. What Kubernetes offers is a ceiling: a ResourceQuota with <storage-class-name>.storageclass.storage.k8s.io/requests.storage caps the sum of storage requests in one namespace for one StorageClass, as the Kubernetes resource quota documentation describes. Quotas on the other tiers protect a critical tier only when their total, plus what the tier needs, fits within usable capacity.
Overcommit is watched by the storage. With thin volumes, the sum of PVC requests can exceed physical capacity, just as thin VMDKs could exceed a datastore. The datastore free-space view is gone, so the warning has to come from thresholds the storage layer enforces.
Choosing a path for each migrated disk
Pick the path by why a disk had its format.
| Path | What it costs | What stays from vSphere | Choose it when |
|---|---|---|---|
| Default thin | Overcommit has to be watched on the storage | Space taken only as the guest writes | The disk was thin, or thick only by default |
| CDI preallocation | Space allocated at creation; no discard passthrough; no supported per-disk switch for migrated disks | Space allocated before the VM uses it, the closest match to eager zeroed | The disk was eager zeroed for write behavior and you measured a gain |
| Limits instead of a reservation | Quotas and caps to design and maintain | A ceiling on what other tiers can claim | The disk was thick to protect capacity for a critical VM |
| Shared-disk redesign | A new shared-volume and clustering design | Nothing from the format; the clustering need remains | The disk was shared in multi-writer mode or backed a WSFC cluster |
Set the matching control before the migration plan runs:
- Default thin. Nothing to set on the disk. It takes space as the guest writes, so the work sits in the storage thresholds.
- CDI preallocation. For a disk you create or re-import as your own DataVolume, set
preallocation: truewhen you create it, because CDI applies preallocation as it writes the DataVolume. CDI then annotates the PVC withcdi.kubevirt.io/storage.preallocation: true, and KubeVirt disables discard passthrough, sofstrimin the guest no longer returns space. For disks the Migration Toolkit for Virtualization (MTV) creates, the only switch upstream CDI names is the cluster-wide one in the CDI resource, and it preallocates every other DataVolume created while it is on. On OpenShift Virtualization the HyperConverged operator manages that resource and reverts direct edits, and Red Hat’s 4.22 documentation covers preallocation only per DataVolume. The MTV guide does not mention preallocation. Check a test migration’s PVC for the annotation before you count on it. For clones the sources differ: upstream CDI says a preallocated clone is filled in full, while Red Hat’s OpenShift 4.22 documentation says preallocation is ignored for cloning operations. Check the release you run. - Limits instead of a reservation. Put the tier on its own StorageClass. Cap the other namespaces with a ResourceQuota keyed to the StorageClass they use, and set capacity caps and alerts in the storage.
- Shared-disk redesign. On the destination the requirement is a shared block volume and clustering software that controls access, not a disk format. The options are in raw device mappings and shared disks after the vSphere exit.
Whether preallocated space takes physical capacity on a thin volume depends on the storage, so do not count preallocation as a reservation; path 3 is what protects capacity.
Thin volumes with guard rails on simplyblock
Simplyblock replaces the format choice with three capacity controls: cluster thresholds, pool caps and a StorageClass size cap. Its logical volumes are thin-provisioned, so storage space is allocated only when it is needed. The StorageClass parameters documented for release 26.3 (pool, QoS limits, encryption, fabric, file system type and others) include no thick-provisioning setting.
Cluster thresholds watch overcommit. In the 26.3 limits reference, a warning fires by default when total provisioned capacity exceeds 250 percent of cluster capacity, and volume creation fails beyond 500 percent. With the same 26.3 defaults, used physical capacity raises a warning at 89 percent, and above the 99 percent critical level the cluster is placed in read-only mode. You set these on the StorageCluster resource, whose warningThreshold and criticalThreshold fields each carry a capacity and a provisionedCapacity value. The overcommit position you once held per datastore becomes a cluster setting.
Pool caps limit what each tier can claim. A StoragePool can set capacityLimit, the maximum aggregate capacity that can be allocated from the pool, and logicalVolumeMaxSize, the largest single volume it accepts. Neither has a cap by default. The operator creates one StorageClass per active pool, named simplyblock-<namespace>-<clusterName>-<poolName>, and a ResourceQuota keys on that name. A separate pool for the critical tier gives you a StorageClass to protect and caps on what the other pools can take. Like quotas, those caps count provisioned size, not physical use.
The StorageClass parameter max_size adds a ceiling on how far a volume of that class can grow. A pool’s StorageClass parameters cannot be changed after the pool is created. Its capacityLimit, logicalVolumeMaxSize and QoS limits are sent once, at creation, and are not reconciled afterward: in 26.3, patching them on an existing pool has no effect, and a different value needs a new pool. Design the tiers before the migration plan runs. The wider sizing model is in VMware capacity planning after the exit, and the platform design in storage for OpenShift Virtualization.
Reclaiming space after the move
A thin volume gives space back only when the guest reports which blocks are free. The 26.3 trimming guide for simplyblock says deleting files does not reclaim capacity on its own. It recommends periodic trims, for example with fstrim.timer, and notes that the result depends on the file system, kernel support and mount configuration. The guest-side setup is in vmkfstools on Kubernetes.
Questions and Answers
How do I tell if a VMDK is lazy zeroed or eager zeroed?
Broadcom’s KB 342229 uses vmkfstools -D on the disk’s flat file in the ESXi shell. If the file length equals the number of allocated blocks times the VMFS block size, the disk is thick. A tbz value of zero, meaning no blocks left to zero, marks it as eagerzeroedthick; any other value means zeroedthick. Record the result and why the disk has that format, so it lands on the right path.
Does migrating a VM to OpenShift Virtualization keep its disks thick?
The format does not travel as a setting. In the Migration Toolkit for Virtualization guide, a storage map pairs each source datastore with a target StorageClass and access mode, and the guide describes no setting for the VMDK provisioning format. The migrated disk’s allocation follows the destination storage. To see whether CDI preallocated a migrated disk, check its PVC for the cdi.kubevirt.io/storage.preallocation annotation. The rest of what the storage map decides is in the storage decisions MTV makes for you.
Can a Windows full format fill a thin volume?
It can. Broadcom’s article on thin disks notes that a Windows format without the Quick Format option writes to every sector and inflates a thin VMDK to its full size. A thin volume on Kubernetes allocates space when data is written, so the same full format can allocate the whole volume unless the storage treats the zeros differently. Use Quick Format on new data disks, and test on your storage before you rely on either behavior.