Skip to content
Permalink
Browse files

virt-install: add support for OVMF

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
  • Loading branch information...
lersek authored and giuseppe committed Sep 11, 2014
1 parent 21319c4 commit d2fffa509efe891eef3f2f70e5688c1d6e3a2d87
Showing with 39 additions and 3 deletions.
  1. +28 −0 man/virt-install.pod
  2. +4 −0 virtinst/cli.py
  3. +7 −3 virtinst/osxml.py
@@ -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
@@ -1437,6 +1437,10 @@ def _init_params(self):
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")
@@ -60,9 +60,9 @@ def is_pseries(self):
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 @@ def set_initargs_string(self, argstring):

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")

0 comments on commit d2fffa5

Please sign in to comment.
You can’t perform that action at this time.