Libvirt domain XML allows only local filepaths to specify a loader element
or its matching NVRAM. Given that VMs may themselves move across hypervisor
hosts, it should be possible to allocate loaders/NVRAM disks on network storage
for uninterrupted access.
This series extends the loader & NVRAM disk elements to be described as
virStorageSource* elements, as discussed in :
https://www.redhat.com/archives/libvir-list/2018-March/msg01721.html
Sample XML with new annotation:
<loader readonly='yes' type='pflash' backing='file'>
<source file='/usr/share/OVMF/OVMF_CODE.fd'/>
</loader>
<nvram backing='network'>
<source protocol='iscsi'
name='iqn.2013-07.com.example:iscsi-nopool/0'>
<host name='example.com' port='6000'/>
</source>
</nvram>
References:
----------
v0/ Proposal:
https://www.redhat.com/archives/libvir-list/2018-March/msg01721.html.v1
v1:
https://www.redhat.com/archives/libvir-list/2018-April/msg02024.html
v2:
https://www.redhat.com/archives/libvir-list/2018-May/msg00948.html
Changelog:
---------
Changes since v2:
- Consolidated patches with related data structures to avoid build breakage.
- Passes make check & make syntax-check.
Prerna Saxena (4):
Schema: Introduce XML schema for network-backed loader and nvram
elements.
Loader: Add a more elaborate definition.
Test: Add a test snippet to evaluate command line generation for
loader/nvram specified via virStorageSource
Documentation: Add a blurb for the newly added XML snippets for loader
and nvram.
docs/formatdomain.html.in | 36 +++-
docs/schemas/domaincommon.rng | 108 +++++++++--
src/bhyve/bhyve_command.c | 6 +-
src/conf/domain_conf.c | 250 +++++++++++++++++++++++--
src/conf/domain_conf.h | 11 +-
src/qemu/qemu_cgroup.c | 13 +-
src/qemu/qemu_command.c | 21 ++-
src/qemu/qemu_domain.c | 31 ++-
src/qemu/qemu_driver.c | 7 +-
src/qemu/qemu_parse_command.c | 30 ++-
src/qemu/qemu_process.c | 54 ++++--
src/security/security_dac.c | 6 +-
src/security/security_selinux.c | 6 +-
src/security/virt-aa-helper.c | 14 +-
src/vbox/vbox_common.c | 11 +-
src/xenapi/xenapi_driver.c | 4 +-
src/xenconfig/xen_sxpr.c | 19 +-
src/xenconfig/xen_xm.c | 9 +-
tests/qemuxml2argvdata/bios-nvram-network.args | 31 +++
tests/qemuxml2argvdata/bios-nvram-network.xml | 42 +++++
tests/qemuxml2argvtest.c | 1 +
21 files changed, 606 insertions(+), 104 deletions(-)
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.args
create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.xml
--
1.8.1.2