Files
docs/doc/source/kube-virt/enable-disk-expansion-2c4457f51802.rst
Ngairangbam Mili e4ec464fe3 Kubevirt Expanded Disks Feature Gate Support (dsr10, dsr10 minor)
Added section to enable Expanded Disks feature

Change-Id: Ica8746dfcab91a3dfee5aeba0b146b7d1d131684
Signed-off-by: Ngairangbam Mili <ngairangbam.mili@windriver.com>
2025-09-18 14:54:26 +00:00

1.6 KiB

Enable Disk Expansion

For storage methods such as or CephFS, Kubernetes supports expanding storage in-use (allowVolumeExpansion feature). With the ExpandDisks feature, KubeVirt can make additional storage available for the virtual machines. This feature is currently disabled by default and requires enabling a feature gate. To enable it, add the ExpandDisks feature gate in the Kubevirt object by applying the following manifest:

apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
  name: kubevirt
  namespace: kubevirt
spec:
  configuration:
    developerConfiguration:
      featureGates:
        - Snapshot
        - ExpandDisks

Expand a PVC Backed Disk from VM

Below is an example of how to expand a backed disk from a :

  1. Identify the to expand (under spec.template.spec.domain.devices.disks).

    kubectl get vm <vm name> -n <namespace> -o yaml
  2. Edit the to expand its size using the kubectl edit pvc <pvc name> -n <namespace> command.

    spec:
      resources:
        requests:
          storage: 20Gi   # new desired size

    Confirm the change using the kubectl get pvc <pvc name> -n <namespace> command.

  3. Restart .

    virtctl stop  <vm name>
    virtctl start <vm name>
  4. Resize the filesystem of OS in use inside .