[virt-tools-list] [virt-manager PATCH RFC 1/4] virt-install: add support for OVMF

Cole Robinson crobinso at redhat.com
Mon Sep 15 19:52:07 UTC 2014


On 09/11/2014 12:56 PM, Giuseppe Scrivano wrote:
> From: Laszlo Ersek <lersek at redhat.com>
> 
> Signed-off-by: Laszlo Ersek <lersek at redhat.com>
> ---
>  man/virt-install.pod | 28 ++++++++++++++++++++++++++++
>  virtinst/cli.py      |  4 ++++
>  virtinst/osxml.py    | 10 +++++++---
>  3 files changed, 39 insertions(+), 3 deletions(-)
> 
> diff --git a/man/virt-install.pod b/man/virt-install.pod
> index 28f6962..e03e8bb 100644
> --- a/man/virt-install.pod
> +++ b/man/virt-install.pod
> @@ -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
> diff --git a/virtinst/cli.py b/virtinst/cli.py
> index b13ff54..881fa9e 100644
> --- a/virtinst/cli.py
> +++ b/virtinst/cli.py
> @@ -1414,6 +1414,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")
> diff --git a/virtinst/osxml.py b/virtinst/osxml.py
> index ea543e7..9f8095b 100644
> --- a/virtinst/osxml.py
> +++ b/virtinst/osxml.py
> @@ -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")
> 

ACK

- Cole




More information about the virt-tools-list mailing list