From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: libvirt with modified QEMU and OVMF Date: Sun, 2 Sep 2018 07:18:01 +0200 Message-ID: References: <129c5140-eb4c-27df-fe43-6f7cbd423edd@larf.space> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000271c160574dc8de9" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwKm8-0000AM-Gb for guix-devel@gnu.org; Sun, 02 Sep 2018 01:18:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwKm7-0003kn-Id for guix-devel@gnu.org; Sun, 02 Sep 2018 01:18:16 -0400 Received: from mail-it0-x230.google.com ([2607:f8b0:4001:c0b::230]:38929) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwKm7-0003kb-Cg for guix-devel@gnu.org; Sun, 02 Sep 2018 01:18:15 -0400 Received: by mail-it0-x230.google.com with SMTP id h1-v6so11888081itj.4 for ; Sat, 01 Sep 2018 22:18:15 -0700 (PDT) In-Reply-To: <129c5140-eb4c-27df-fe43-6f7cbd423edd@larf.space> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?UTF-8?B?TGFycyBCw7Zja2Vs?= Cc: Guix-devel --000000000000271c160574dc8de9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable P Lars B=C3=B6ckel ezt =C3=ADrta (id=C5=91pont: 2018. s= zept. 2., V 3:47): > Hello Guix, > > i wanted to recommend some changes to libvirt which would improve the > usability of libvirt. > > 1) OVMF(UEFI) capability with QEMU. In NixOS you can achieve this with > > virtualisation.libvirtd.enable =3D true; > virtualisation.libvirtd.qemuOvmf =3D true; > virtualisation.libvirtd.qemuVerbatimConfig =3D '' > nvram =3D [ "${pkgs.OVMF}/FV/OVMF.fd:${pkgs.OVMF}/FV/OVMF_VARS.fd" = ] > user =3D "1000" > ''; > I was thinking about getting this done for a while. It would be very useful. Actually there should be a private writable copy of the ovmf variable area for each vm, and a shared read only for the rest of ovmf. > > the "user" part is not necessary but is required for system VMs in > combination with qemu's pulseaudio driver. qemuVerbatimConfig is the > config that is at /etc/libvirt/qemu.conf in traditional GNU/Linux > distributions. > > 2) Using a modified QEMU with libvirt. A modified QEMU could help > sometimes. A way to specify which QEMU package to use would be helpful > to resolve issues with newer qemu versions or patches which are not > upstream. While in NixOS you could add patches like this > > nixpkgs.config.packageOverrides =3D pkgs: rec { > qemu =3D pkgs.qemu.overrideAttrs (attrs:{ > patches =3D (lib.filter (x: ! (lib.hasSuffix > "fix-hda-recording.patch" (builtins.toString x))) attrs.patches) ++ [ > /path/to/qemu.patch ]; > } > ); > }; > j > to the QEMU package, i don't think this is possible in GuixSD. > > Thank you for your work. Please let me know what you think. > The libvirt service accepts a libvirt configuration, where you can specify the libvirt package in use. I guess it would be easy to provide a similar mechanism to give the qemu package. If qemu is an input of libvirt then providing a custom libvirt having the custom qemu would be good enough. I'm on mobile now, so I can't check. --000000000000271c160574dc8de9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
P

Lars B=C3=B6ckel <listdump@larf.space> ezt =C3=ADrta (id=C5=91pont: = 2018. szept. 2., V 3:47):
Hello Gu= ix,

i wanted to recommend some changes to libvirt which would improve the
usability of libvirt.

1) OVMF(UEFI) capability with QEMU. In NixOS you can achieve this with

=C2=A0=C2=A0 virtualisation.libvirtd.enable =3D true;
=C2=A0=C2=A0 virtualisation.libvirtd.qemuOvmf =3D true;
=C2=A0=C2=A0=C2=A0 virtualisation.libvirtd.qemuVerbatimConfig =3D ''= ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nvram =3D [ "${pkgs.OVMF}/FV/OVMF.fd:${= pkgs.OVMF}/FV/OVMF_VARS.fd" ]
=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0user =3D "1000"
=C2=A0=C2=A0=C2=A0 '';
I was thinking about getting this done for a while. It would be very usef= ul. Actually there should be a private writable copy of the ovmf variable a= rea for each vm, and a shared read only for the rest of ovmf.

the "user" part is not necessary but is required for system VMs i= n
combination with qemu's pulseaudio driver. qemuVerbatimConfig is the config that is at /etc/libvirt/qemu.conf in traditional GNU/Linux
distributions.

2) Using a modified QEMU with libvirt. A modified QEMU could help
sometimes. A way to specify which QEMU package to use would be helpful
to resolve issues with newer qemu versions or patches which are not
upstream. While in NixOS you could add patches like this

=C2=A0=C2=A0=C2=A0=C2=A0 nixpkgs.config.packageOverrides =3D pkgs: rec { =C2=A0=C2=A0=C2=A0=C2=A0 qemu =3D pkgs.qemu.overrideAttrs (attrs:{
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 patches =3D (lib.filter (x: ! (lib.has= Suffix
"fix-hda-recording.patch" (builtins.toString x)))=C2=A0 attrs.pat= ches) ++ [
/path/to/qemu.patch=C2=A0=C2=A0=C2=A0 ];
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
=C2=A0=C2=A0=C2=A0 =C2=A0);
=C2=A0=C2=A0 };
j
to the QEMU package, i don't think this is possible in GuixSD.

Thank you for your work. Please let me know what you think.
The libvirt service accepts a libvirt config= uration, where you can specify the libvirt package in use. I guess it would= be easy to provide a similar mechanism to give the qemu package. If qemu i= s an input of libvirt then providing a custom libvirt having the custom qem= u would be good enough. I'm on mobile now, so I can't check.
<= /div> --000000000000271c160574dc8de9--