xenconfig: support bios=ovmf xl.cfg

Add support to xenconfig for conversion of xl.cfg(5) bios config
to/from libvirt domXml <loader> config. SeaBIOS is the default
for HVM guests using upstream QEMU. ROMBIOS is the default when
using the old qemu-dm. This patch allows specifying OVMF as an
alternate firmware.

Example xl.cfg:
  bios = "ovmf"

Example domXML:
  <os>
    ...
    <loader readonly='yes' type='pflash'>/usr/lib/xen/boot/ovmf.bin</loader>
  </os>

Note that currently Xen does not support a separate nvram for
non-volatile variables.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Jim Fehlig
2016-04-20 15:14:34 -06:00
parent 11567cf66f
commit 53d98ccea7
7 changed files with 202 additions and 29 deletions

View File

@@ -718,6 +718,22 @@ virTestCompareToFile(const char *strcontent,
return ret;
}
/*
* @param strcontent: String input content
* @param strsrc: String source to compare strcontent against
*/
int
virTestCompareToString(const char *strcontent,
const char *strsrc)
{
if (STRNEQ_NULLABLE(strcontent, strsrc)) {
virTestDifference(stderr, strcontent, strsrc);
return -1;
}
return 0;
}
static void
virTestErrorFuncQuiet(void *data ATTRIBUTE_UNUSED,
virErrorPtr err ATTRIBUTE_UNUSED)