Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNegj-0004WL-7F for qemu-devel@nongnu.org; Mon, 28 Jul 2008 22:11:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNegg-0004V4-6E for qemu-devel@nongnu.org; Mon, 28 Jul 2008 22:11:44 -0400 Received: from [199.232.76.173] (port=32957 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNegg-0004V0-1I for qemu-devel@nongnu.org; Mon, 28 Jul 2008 22:11:42 -0400 Received: from ik-out-1112.google.com ([66.249.90.178]:1707) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNegf-0000J3-5s for qemu-devel@nongnu.org; Mon, 28 Jul 2008 22:11:42 -0400 Received: by ik-out-1112.google.com with SMTP id c21so4060391ika.2 for ; Mon, 28 Jul 2008 19:11:36 -0700 (PDT) Message-ID: <59abf66e0807281911t7800fd14s7aecbf411e7bb36@mail.gmail.com> Date: Mon, 28 Jul 2008 23:11:36 -0300 From: "=?ISO-8859-1?Q?Jorge_Luc=E1ngeli_Obes?=" Subject: Re: [Qemu-devel] [PATCH] qcow3 - arbitrary metadata In-Reply-To: <20080729014939.GA27149@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <488E2752.7030008@codemonkey.ws> <20080729014939.GA27149@shareable.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Jul 28, 2008 at 10:49 PM, Jamie Lokier wrote: > Anthony Liguori wrote: >> Can you provide more information about what the metadata is used for and >> why it's so important for the metadata to be in the image verses in a >> separate file? > > Yeah, I have the opposite problem - too much in the same file :-) > > I want to be able to savevm, but some of my VMs don't have any qcow2 > images (because I don't trust them for mission-critical VMs since > recent discussion, or because they are floppy-only or CD-only VMs with > no hard disk). > > To enable savevm, at least according to docs, I have to have a qcow2 > image somewhere. So I add a redundant minimum-size unpartitioned > qcow2 hard disk and hope nobody minds... > > That seems a bit hackish. It would be nice if savevm could just write > to a named file and loadvm could read it. I think this brings us to the main conceptual point of the discussion: what does an image file represent? I am now partial to the idea that an image file is nothing more than the representation of some kind of storage device. It's not meant, IMHO, to be the representation of an entire machine. As Laurent pointed out, he and I proposed and coded a (quite hackish) way of storing command-line options in qcow2 image files, which used empty qcow2 snapshots. This was Avi's original suggestion to make image files self-contained. The goal of this approach was to have a quick and easy way to avoid the QEMU command-line. The use case was to replace launch scripts, not to replace tools as libvirt and virt-manager. A lengthy discussion followed the patches and my conclusion was that there were many valid objections to our approach, but more than that, there were many strong opinions on what the best way to achieve this was. I remember Anthony Liguori proposing another way of having self-contained images, though I don't remember the particulars of his approach right now. As Laurent also mentions, Fabrice has proposed a configuration file format which I think is a good way of solving the problem. Personally, I just want to have some way of avoiding the command-line options that doesn't involve scripts. Anyways, the point that I was trying to make was that a good solution would separate concerns: the image file is the disk, the configuration file (in this case) represents the machine. Looking back, I think that storing command-line options in an empty qcow2 snapshot was a quick hack, without much conceptual integrity. I won't deny it, thought, it was extremely useful. As Jamie exemplifies, storing everything in the image file can be inflexible for some use cases. IMHO, a "virtual appliance" format would bundle an image file and some other configuration files, but that would possibly not be a part of QEMU itself. Regards, Jorge