On a Friday in 2022, Peter Krempa wrote:
From: Rohit Kumar <rohit.kumar3(a)nutanix.com>
This patch introduces the logic to format and parse remote NVRAM.
Update NVRAM element schema, and docs for supporting network backed
NVRAM. NVRAM backed over network would give the flexibility to start
the VM on any host without having to worry about where to get the latest
nvram image.
<nvram type='network'>
<source protocol='iscsi'
name='iqn.2013-07.com.example:iscsi-nopool/0'>
<host name='example.com' port='6000'/>
</source>
</nvram>
or
<nvram type='file'>
<source file='/var/lib/libvirt/nvram/guest_VARS.fd'/>
</nvram>
In the qemu driver we will support the new definition only with qemu's
supporting -blockdev.
Signed-off-by: Prerna Saxena <prerna.saxena(a)nutanix.com>
Signed-off-by: Florian Schmidt <flosch(a)nutanix.com>
Signed-off-by: Rohit Kumar <rohit.kumar3(a)nutanix.com>
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/formatdomain.rst | 37 ++++++++++
src/conf/domain_conf.c | 116 ++++++++++++++++++++++++------
src/conf/domain_conf.h | 1 +
src/conf/schemas/domaincommon.rng | 9 ++-
src/qemu/qemu_validate.c | 7 ++
5 files changed, 146 insertions(+), 24 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 312b605a8b..8a9da07612 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -135,6 +135,34 @@ harddisk, cdrom, network) determining where to obtain/find the boot
image.
</os>
...
+ <!-- QEMU with UEFI manual firmware, secure boot and with NVRAM type
'file'-->
+ ...
+ <os>
+ <type>hvm</type>
+ <loader readonly='yes' secure='yes'
type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
+ <nvram type='file' template='/usr/share/OVMF/OVMF_VARS.fd'>
+ <source file='/var/lib/libvirt/nvram/guest_VARS.fd'/>
Unterminated <nvram>
+ <boot dev='hd'/>
+ </os>
+ ...
+
+ <!-- QEMU with UEFI manual firmware, secure boot and with network backed
NVRAM'-->
+ ...
+ <os>
+ <type>hvm</type>
+ <loader readonly='yes' secure='yes'
type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
+ <nvram type='network'>
+ <source protocol='iscsi'
name='iqn.2013-07.com.example:iscsi-nopool/0'>
+ <host name='example.com' port='6000'/>
+ <auth username='myname'>
+ <secret type='iscsi' usage='mycluster_myname'/>
+ </auth>
+ </source>
+ </nvram>
+ <boot dev='hd'/>
+ </os>
+ ...
+
<!-- QEMU with automatic UEFI firmware and secure boot -->
...
<os firmware='efi'>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano