From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQsGa-0000aI-8S for qemu-devel@nongnu.org; Thu, 07 Jun 2018 06:35:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQsGZ-0008IQ-3A for qemu-devel@nongnu.org; Thu, 07 Jun 2018 06:35:40 -0400 Date: Thu, 7 Jun 2018 11:35:30 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20180607103529.GG2522@work-vm> References: <9e8b49fb-0162-bf35-21bb-acc0dc28555f@redhat.com> <20180606120050.GB2661@work-vm> <61a301dd-8e50-8799-8328-341d6ab744f5@redhat.com> <20180606143134.GG2660@work-vm> <39bcee27-329a-61d8-47fa-678b431b0a79@redhat.com> <20180606150507.GJ2660@work-vm> <66727986-1cf1-c12e-d78c-d56cc15eaf00@redhat.com> <20180606163246.GL3064@redhat.com> <20180607103218.GC1455@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180607103218.GC1455@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] storing machine data in qcow images? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: Andrea Bolognani , Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= , Eric Blake , Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com, Max Reitz * Richard W.M. Jones (rjones@redhat.com) wrote: > On Thu, Jun 07, 2018 at 12:02:29PM +0200, Andrea Bolognani wrote: > > Something that I haven't seen mentioned in the thread - and this > > looks like as good a point as any to jump in - is that for q35 > > guests using EFI as well as aarch64 guests the "one click import" > > experience requires not only hints about the machine (and firmware!) > > type, but also a copy of the EFI variable store: > >=20 > > $ virt-builder fedora-27 --arch aarch64 --notes > > Fedora=C2=AE 27 Server (aarch64) > >=20 > > [...] > >=20 > > You will need to use the associated UEFI NVRAM variables file: > > http://libguestfs.org/download/builder/fedora-27-aarch64-nvram.xz >=20 > This is true, although only sometimes. If the bootloader[*] has a > working fallback path then usually it is able to boot and reset the > UEFI varstore back to the correct values. We have had bugs before > where the fallback path was not working, eg: >=20 > https://bugzilla.redhat.com/show_bug.cgi?id=3D1353689 (yours!) > https://bugzilla.redhat.com/show_bug.cgi?id=3D1558793 >=20 > Another problem which Laszlo mentioned is the varstore isn't portable > between UEFI implementations, or if the UEFI is compiled with > different options. You can even imagine shipping multiple > varstores(!) which argues for a tar-like format. Given that level of incompatibility with var stores (which I've seen myself) I don't see how you can distribute them with images. Dave > > While hints might be considered a reasonable fit for qcow2, I think > > it's pretty hard to argue for embedding the NVRAM file in there, > > which to me signals quite clearly that an archive containing the > > disk image(s) *and* the configuration hints *and* other ancillary > > files such as the NVRAM is the only way to build a solution that's > > not dead on arrival. >=20 > The tar argument is quite strong. Just not the wretched OVA/OVF :-) >=20 > > It's pretty easy then to imagine using something like > >=20 > > $ virt-builder \ > > fedora-27 \ > > --arch aarch64 \ > > --format qva \ > > --output f27-aarch64.qva > >=20 > > or download the equivalent from some website, followed by > >=20 > > $ virt-install \ > > --name f27-aarch64 \ > > --import \ > > --input f27-aarch.qva > >=20 > > or the equivalent pointy-clicky import step and having things > > Just Work=E2=84=A2, provided sufficient hints are included in the arc= hive; > > the user, or the management application, would of course be able > > to override such hints at import time. >=20 > RFEs for virt-builder & virt-install one day :-) >=20 > Rich. >=20 > [*] I'm not sure exactly which bit of the bootloader does this, > whether it's UEFI itself, or the grub-efi in the guest. >=20 >=20 > --=20 > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~= rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-p2v converts physical machines to virtual machines. Boot with a > live CD or over the network (PXE) and turn machines into KVM guests. > http://libguestfs.org/virt-v2v -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK