-
Notifications
You must be signed in to change notification settings - Fork 291
Description
What happened:
When provisioning a new VM in KubeVirt, if the volume has a snapshot source and we intend to change the disk size while provisioning, the resulting DV and PVC show new size but OS still reflects the snapshot size. This only happens in a PVC whose volumeMode
is set to Block and is not observed in Filesystem mode. The VMs always reflect new size in Filesystem mode. Even restarts, resize2fs
and other tools don't recognize the expanded volume. After deployment, if you increase the PVC size by even a single gibibyte, the new size is reflected instantly in OS.
What you expected to happen:
The resultant KubeVirt VM to have the new size as mentioned in the dataVolumeTemplates
spec.
How to reproduce it (as minimally and precisely as possible):
- Ensure you have Ubuntu installed block PVC say of size 20G
- Create a snapshot of this block PVC
- Deploy a new VM with
dataVolumeTemplates
and choose the newly created snapshot as source and use disk size to be 21G - Observe the DV and PVC of the newly created VM to reflect 21G size
- Log in to the VM and observe the guest OS size in
lsblk
to reflect 20G
Additional context:
Earlier we were not seeing this issue because we were hitting an issue identified here, which forced a copy
instead of snapshot
Environment:
- CDI version (use kubectl get deployments cdi-deployment -o yaml): v1.62.0
- KubeVirt version: v1.5.1
- Kubernetes version (use kubectl version): v1.31.4
- Cloud provider or hardware configuration: Vanilla Kubernetes (bare-metal)
- OS (e.g. from /etc/os-release): Ubuntu 22.04.4 LTS
- Kernel (e.g. uname -a): 5.15.0-94-generic
- Container-runtime: Containerd://1.7.24