From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Storing command line options in qcow2 images Date: Mon, 06 Aug 2007 15:13:26 -0500 Message-ID: <46B780E6.8050305@codemonkey.ws> References: <59abf66e0707292040j11c8b981mf7f793258e874400@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: =?ISO-8859-1?Q?Jorge_Luc=E1ngeli_Obes?= Return-path: In-Reply-To: <59abf66e0707292040j11c8b981mf7f793258e874400-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org I don't think adding annotations as snapshots is the right approach. I = think proper support should be added in the header. I wouldn't be too = concerned with breaking compatibility in qcow2. That's why it's qcow2 = and not just an updated version of qcow, qcow2 is still, AFAIK, open for = breakage. Regards, Anthony Liguori Jorge Luc=E1ngeli Obes wrote: > Hi Avi, hi all, > > I've started some (very minor) groundwork for this task. My idea was > to add an extra "annotation" field in qcow2 snapshots. In this way, a > snapshot can hold abitrary information; for example, command line > arguments. > > Before going any further, I wanted to validate the general idea with > the list. I am planning on using a snapshot with a distinct name to > store command line options. This approach seems simple yet it is > powerful enough for what we need to do. > > There's a slight overhead as now all qcow2 snapshots have to store a > extra (probably) empty pointer. An alternative approach would be to > somehow indicate that some snapshots are "descriptive" snapshots and > others are "useful" snapshots; however, I felt that this would be more > complicated. > > I have a working patch to qemu-img that allows storing arbitrary > annotations into qcow2 images. I developed it as a testing utility. > Right now annotations are implemented as another string alongside the > snapshot's 'name' and 'id'. I thought about storing annotations as > key/value pairs but again, it seemed overkill. > > >From here, the plan would be to add a command to qemu-img that allows > embedding of command line options into qcow2 images. These options > would be stored in a snapshot with a special name, and qemu would > check for the presence of this snapshot in order to read command line > options from the qcow2 image. > > Ideas? Suggestions? I can send the patches for the functionality > that's implemented right now. > > Cheers, > Jorge > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > kvm-devel mailing list > kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/kvm-devel > > = ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/