]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: process: Introduce setup of block-device backed NVRAM
authorPeter Krempa <pkrempa@redhat.com>
Fri, 18 Oct 2024 13:55:44 +0000 (15:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 15 Nov 2024 08:42:05 +0000 (09:42 +0100)
commitf35f817ebf944392066d0cbc0502d16ecfcbc10e
tree47f8110294545210a7a4bdd8c85e6254f5032c90
parentfce4319f581e3accf02bcd58045d2136d0b5de83
qemu: process: Introduce setup of block-device backed NVRAM

In case when a management application will require to store the nvram in
a block device instead of a file libvirt needs to be able to set up the
block device.

This patch introduces support for setting up the block device by using
'qemu-img convert' to produce a qcow2-formatted block device.

The use of 'qcow2' is made mandatory as the UEFI firmware requires that
the NVRAM image has the exact expected size, which is almost impossible
with block devices. 'qcow2' also allows libvirt to detect wheher the
block device is formatted allowing file-like semantics.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_process.c