From 78a250742bb15f78105f80adc58eff7f5e8b9173 Mon Sep 17 00:00:00 2001 From: Ian Bishop <151477169+ianb-mp@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:07:01 +1000 Subject: [PATCH 1/2] Update persistent TPM & UEFI to clarify storageclass requirements Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com> --- docs/compute/persistent_tpm_and_uefi_state.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/compute/persistent_tpm_and_uefi_state.md b/docs/compute/persistent_tpm_and_uefi_state.md index 61ead0083..584de87b0 100644 --- a/docs/compute/persistent_tpm_and_uefi_state.md +++ b/docs/compute/persistent_tpm_and_uefi_state.md @@ -8,8 +8,10 @@ As of v1.0.0, KubeVirt supports using a PVC to persist those files. KubeVirt usu ## Backend storage -KubeVirt automatically creates backend storage PVCs for VMs that need it. However, the admin must first enable the `VMPersistentState` feature gate, and tell KubeVirt which storage class to use by setting the `vmStateStorageClass` configuration parameter in the KubeVirt Custom Resource (CR). -The storage class must support read-write-many (RWX) in filesystem mode (FS). +KubeVirt automatically creates backend storage PVCs for VMs that need it. However, to persist TPM and UEFI state, the admin must first enable the `VMPersistentState` feature gate. + +If [live migration](live_migration.md) is required, then the `vmStateStorageClass` configuration parameter should be set, and must reference a storage class that supports read-write-many (RWX) in filesystem mode (FS). + Here's an example of KubeVirt CR that sets both: ```yaml apiVersion: kubevirt.io/v1 @@ -22,9 +24,9 @@ spec: - VMPersistentState ``` -### Limitations - -- As mentioned above, the backend storage PVC can only be created using a storage class that supports RWX FS. There is ongoing work to support block storage in future versions of KubeVirt. +### Notes: +- If no storage class is specified, the default storage class will be used +- If the storage class has a storage profile that indicates it only supports read-write-once (RWO) then a RWO PVC will be created and the VMI will be marked as non-migratable. - Backend storage is currently incompatible with VM snapshot. It is planned to add snapshot support in the future. ## TPM with persistent state From 45e5f6bf5558fd211526a8c42296ac4b4df41f49 Mon Sep 17 00:00:00 2001 From: Ian Bishop <151477169+ianb-mp@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:17:05 +1000 Subject: [PATCH 2/2] persistent TPM & UEFI, corrections Signed-off-by: Ian Bishop <151477169+ianb-mp@users.noreply.github.com> --- docs/compute/persistent_tpm_and_uefi_state.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/compute/persistent_tpm_and_uefi_state.md b/docs/compute/persistent_tpm_and_uefi_state.md index 584de87b0..05b9843f2 100644 --- a/docs/compute/persistent_tpm_and_uefi_state.md +++ b/docs/compute/persistent_tpm_and_uefi_state.md @@ -8,9 +8,7 @@ As of v1.0.0, KubeVirt supports using a PVC to persist those files. KubeVirt usu ## Backend storage -KubeVirt automatically creates backend storage PVCs for VMs that need it. However, to persist TPM and UEFI state, the admin must first enable the `VMPersistentState` feature gate. - -If [live migration](live_migration.md) is required, then the `vmStateStorageClass` configuration parameter should be set, and must reference a storage class that supports read-write-many (RWX) in filesystem mode (FS). +KubeVirt automatically creates backend storage PVCs for VMs that need it. However, to persist TPM and UEFI state, the admin must first enable the `VMPersistentState` feature gate. `vmStateStorageClass` may be used to manually specify a storage class, otherwise the default storage class will be used. Here's an example of KubeVirt CR that sets both: ```yaml @@ -25,8 +23,6 @@ spec: ``` ### Notes: -- If no storage class is specified, the default storage class will be used -- If the storage class has a storage profile that indicates it only supports read-write-once (RWO) then a RWO PVC will be created and the VMI will be marked as non-migratable. - Backend storage is currently incompatible with VM snapshot. It is planned to add snapshot support in the future. ## TPM with persistent state