Added section to enable Expanded Disks feature Change-Id: Ica8746dfcab91a3dfee5aeba0b146b7d1d131684 Signed-off-by: Ngairangbam Mili <ngairangbam.mili@windriver.com>
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 :
Identify the to expand (under
spec.template.spec.domain.devices.disks).kubectl get vm <vm name> -n <namespace> -o yamlEdit the to expand its size using the
kubectl edit pvc <pvc name> -n <namespace>command.spec: resources: requests: storage: 20Gi # new desired sizeConfirm the change using the
kubectl get pvc <pvc name> -n <namespace>command.Restart .
virtctl stop <vm name> virtctl start <vm name>Resize the filesystem of OS in use inside .