From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Lars_B=c3=b6ckel?= Subject: Re: libvirt with modified QEMU and OVMF Date: Sat, 8 Sep 2018 23:56:34 +0200 Message-ID: <9de89b41-b522-3c40-a879-432801325b88@larf.space> References: <129c5140-eb4c-27df-fe43-6f7cbd423edd@larf.space> <87efe4grnm.fsf@gnu.org> <87in3fem46.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyy3t-0004cT-Cv for guix-devel@gnu.org; Sun, 09 Sep 2018 07:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyy3n-0000mQ-T8 for guix-devel@gnu.org; Sun, 09 Sep 2018 07:39:29 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:55960) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fyy3n-0000jf-IN for guix-devel@gnu.org; Sun, 09 Sep 2018 07:39:23 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id BE724132C for ; Sun, 9 Sep 2018 13:39:21 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRJGxvrvTj11 for ; Sun, 9 Sep 2018 13:39:20 +0200 (CEST) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8880C129E for ; Sun, 9 Sep 2018 13:39:20 +0200 (CEST) Resent-To: guix-devel@gnu.org Resent-Message-ID: <87musqdhnc.fsf@gnu.org> In-Reply-To: <87in3fem46.fsf@gnu.org> Content-Language: en-US-large 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?Q?Ludovic_Court=c3=a8s?= Thanks for sharing your idea about it. I cannot pull right now but i=20 think ...nvram =3D " ovmf "/F... would not work since you would have to=20 call the complete path of the package. Though something like "nvram =3D=20 /run/current-system/profile/share/firmware/ovmf_x64.bin" COULD work. I=20 don't know how it would react to the massive wall of symlinks. That is=20 probably the reason why NixOS calls it with ${pkgs.OVMF}. The produced=20 file in NixOS (/var/lib/libvirt/qemu.conf) points to /nix/store/.... For usability something you can just put in libvirt-service-type with #t=20 would be good for usability. As well as the user variable.=20 Configurations like these are probably more common than changing=20 tls-ports and would simplify the migration of people running different=20 systems since they could more easily configure VMs with UEFI support. When my internet is running again i will pull and try this config. But=20 since its saturday that might take some time... You can easily check for=20 UEFI support in libvirt with either virt-install --boot uefi or in=20 virt-manager when you create a vm and edit it beforehand you have a=20 dropdown menu for BIOS/UEFI. If someone could test it out and report=20 back that would be great! >> i would like to push the issue with OVMF in libvirt again: >> >> I would like to have OVMF(UEFI) capability with QEMU. In NixOS you can >> achieve this with >> >> =C2=A0 virtualisation.libvirtd.enable =3D true; >> =C2=A0 virtualisation.libvirtd.qemuOvmf =3D true; >> =C2=A0=C2=A0 virtualisation.libvirtd.qemuVerbatimConfig =3D '' >> =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=A0user =3D "1000" >> =C2=A0=C2=A0 ''; >> >> 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. > I don=E2=80=99t know about OVMF but IIUC, what you need here is to crea= te > /etc/libvirt/qemu.conf. To do that, you can something along these > lines: > > (simple-service 'qemu-conf etc-service-type > `(("libvirt/qemu.conf" > ,(mixed-text-file "qemu.conf" > "nvarm =3D " > ovmf "/FV/OVMF.fd:=E2=80=A6'))= )) > > Would that work? > > (Actually the =E2=80=9Clibvirt/=E2=80=9D bit is only possible since com= mit > 5dec93bb8ba89605bce2f9a5ee9c4dbadeee3b58, a few minutes ago=E2=80=A6) > > We could provide a proper abstraction on top of that if needed, but I=E2= =80=99m > not familiar with libvirt. If you have ideas on how to improve this, > that=E2=80=99d be great! > > Thanks, > Ludo=E2=80=99.