Skip to content

Commit 0d14bb9

Browse files
authored
Merge pull request #76833 from danielclowers/CNV-29661
CNV#29661: documentation for persistent nvram
2 parents abc3473 + 89597f2 commit 0d14bb9

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-uefi-mode-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="configuring-vm-with-persistent-efi_{context}"]
7+
= Configuring VMs with persistent EFI
8+
9+
You can configure a VM to have EFI persistence enabled by editing its manifest file.
10+
11+
.Prerequisites
12+
13+
* `VMPersistentState` feature gate enabled.
14+
15+
.Procedure
16+
17+
* Edit the VM manifest file and save to apply settings.
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: kubevirt.io/v1
22+
kind: VirtualMachine
23+
metadata:
24+
name: vm
25+
spec:
26+
template:
27+
spec:
28+
domain:
29+
firmware:
30+
bootloader:
31+
efi:
32+
persistent: true
33+
# ...
34+
----
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/virtual_machines/advanced_vm_management/virt-uefi-mode-for-vms.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-enabling-persistent-efi_{context}"]
7+
= Enabling persistent EFI
8+
9+
You can enable EFI persistence in a VM by configuring an RWX storage class at the cluster level and adjusting the settings in the EFI section of the VM.
10+
11+
.Prerequisites
12+
13+
* You must have cluster administrator privileges.
14+
* You must have a storage class that supports RWX access mode and FS volume mode.
15+
16+
.Procedure
17+
18+
* Enable the `VMPersistentState` feature gate by running the following command:
19+
+
20+
[source,terminal,subs="attributes+"]
21+
----
22+
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
23+
--type json -p '[{"op":"replace","path":"/spec/featureGates/VMPersistentState", "value": true}]'
24+
----

virt/virtual_machines/advanced_vm_management/virt-uefi-mode-for-vms.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ You can boot a virtual machine (VM) in Unified Extensible Firmware Interface (UE
1010

1111
include::modules/virt-about-uefi-mode-for-vms.adoc[leveloffset=+1]
1212
include::modules/virt-booting-vms-uefi-mode.adoc[leveloffset=+1]
13+
include::modules/virt-enabling-persistent-efi.adoc[leveloffset=+1]
14+
include::modules/virt-configuring-vm-with-persistent-efi.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)