virt-install: add support for OVMF

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Laszlo Ersek 2014-09-11 11:18:32 +02:00 committed by Giuseppe Scrivano
parent 21319c4232
commit d2fffa509e
3 changed files with 39 additions and 3 deletions

View File

@ -452,6 +452,34 @@ configurations like ARM or PPC
Use BIOSPATH as the virtual machine BIOS. Only valid for fully virtualized
guests.
=item B<--boot loader=/usr/share/OVMF/OVMF_CODE.fd,loader_ro=yes,loader_type=pflash>
Specify that the virtual machine use the system-wide installed OVMF binary as
boot firmware, mapped as a virtual flash chip. This form requests that libvirt
instantiate the VM-specific UEFI varstore from the varstore template that is
assigned to "/usr/share/OVMF/OVMF_CODE.fd" in libvirtd's "qemu.conf", in the
"nvram" stanza.
Only valid for fully virtualized guests.
=item B<--boot loader=/.../OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram_template=/.../OVMF_VARS.fd>
Specify that the virtual machine use the custom OVMF binary as boot firmware,
mapped as a virtual flash chip. In addition, request that libvirt instantiate
the VM-specific UEFI varstore from the custom "/.../OVMF_VARS.fd" varstore
template.
Only valid for fully virtualized guests.
=item B<--boot loader=/.../OVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram=/.../guest_VARS.fd>
Specify that the virtual machine use the custom OVMF binary as boot firmware,
mapped as a virtual flash chip. In addition, the VM-specific UEFI varstore is
directly the preexistent file "/.../guest_VARS.fd"; it is not instantiated from
any template.
Only valid for fully virtualized guests.
=item B<--boot menu=on,useserial=on>
Enable the bios boot menu, and enable sending bios text output over

View File

@ -1437,6 +1437,10 @@ class ParserBoot(VirtCLIParser):
self.set_param("os.initrd", "initrd")
self.set_param("os.dtb", "dtb")
self.set_param("os.loader", "loader")
self.set_param("os.loader_ro", "loader_ro", is_onoff=True)
self.set_param("os.loader_type", "loader_type")
self.set_param("os.nvram", "nvram")
self.set_param("os.nvram_template", "nvram_template")
self.set_param("os.kernel_args", "kernel_args", aliases=["extra_args"])
self.set_param("os.init", "init")
self.set_param("os.arch", "arch")

View File

@ -60,9 +60,9 @@ class OSXML(XMLBuilder):
return self.is_ppc64 and self.machine == "pseries"
_XML_ROOT_NAME = "os"
_XML_PROP_ORDER = ["arch", "os_type", "loader",
"kernel", "initrd", "kernel_args", "dtb",
"_bootdevs"]
_XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
"nvram", "nvram_template", "kernel", "initrd",
"kernel_args", "dtb", "_bootdevs"]
def _get_bootorder(self):
return [dev.dev for dev in self._bootdevs]
@ -99,6 +99,10 @@ class OSXML(XMLBuilder):
init = XMLProperty("./init")
loader = XMLProperty("./loader")
loader_ro = XMLProperty("./loader/@readonly", is_yesno=True)
loader_type = XMLProperty("./loader/@type")
nvram = XMLProperty("./nvram")
nvram_template = XMLProperty("./nvram/@template")
arch = XMLProperty("./type/@arch",
default_cb=lambda s: s.conn.caps.host.cpu.arch)
machine = XMLProperty("./type/@machine")