Create autogenerated nvram file from template path
Goal
I want to specify something like:
<loader readonly='yes' type='pflash'>/usr/share/edk2/x64/OVMF_CODE.fd</loader>
<nvram template='/path/to/custom/vars.fd'></nvram>
and get something like:
<loader readonly='yes' type='pflash'>/usr/share/edk2/x64/OVMF_CODE.fd</loader>
<nvram template='/path/to/custom/vars.fd'>/var/lib/libvirt/qemu/nvram/box_VARS.fd</nvram>
Similar to how if <nvram> is entirely omitted, libvirt creates the <nvram> entirely:
<loader readonly='yes' type='pflash'>/usr/share/edk2/x64/OVMF_CODE.fd</loader>
<nvram template='/usr/share/edk2/x64/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/box_VARS.fd</nvram>
But at the moment I appear to get:
<loader readonly='yes' type='pflash'>/usr/share/edk2/x64/OVMF_CODE.fd</loader>
<nvram template='/path/to/custom/vars.fd'>/path/to/custom/vars.fd</nvram>
Is this achievable?