From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IJUVQ-00068l-7o for qemu-devel@nongnu.org; Fri, 10 Aug 2007 09:26:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IJUVN-00068Z-Sl for qemu-devel@nongnu.org; Fri, 10 Aug 2007 09:26:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IJUVN-00068W-Kh for qemu-devel@nongnu.org; Fri, 10 Aug 2007 09:26:17 -0400 Received: from nz-out-0506.google.com ([64.233.162.230]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IJUVN-00076X-8p for qemu-devel@nongnu.org; Fri, 10 Aug 2007 09:26:17 -0400 Received: by nz-out-0506.google.com with SMTP id f1so1295475nzc for ; Fri, 10 Aug 2007 06:26:16 -0700 (PDT) Message-ID: Date: Fri, 10 Aug 2007 10:26:15 -0300 From: "Carlos A. M. dos Santos" Subject: Re: [Qemu-devel] [PATCH 4/4][RFC] Add logic to QEMU to read command line options from qcow2 images In-Reply-To: <46BBE0B5.8050303@filteredperception.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <59abf66e0708081124g14901b01i841b70d17ae1e097@mail.gmail.com> <59abf66e0708081252of2948d7we85c9084bad245d4@mail.gmail.com> <20070808202428.GA25050@redhat.com> <46BB2A99.3030609@codemonkey.ws> <46BB7625.2050900@qumranet.com> <46BB7842.1030101@codemonkey.ws> <46BB7966.3090007@qumranet.com> <46BB79ED.2020503@codemonkey.ws> <1186692263.20963.42.camel@wombat.dlib.indiana.edu> <46BBE0B5.8050303@filteredperception.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 8/10/07, dmc wrote: > Brian Wheeler wrote: > > On Thu, 2007-08-09 at 15:32 -0500, Anthony Liguori wrote: > >> Avi Kivity wrote: > >>> Anthony Liguori wrote: > >>>> If you're looking for a low-end solution, another possibility would > >>>> be having a "new" file format which consisted of: > >>>> > >>>> #!/path/to/qemu [ ...] > >>>> > >>>> > >>>> And then make the appropriate changes to QEMU such that it can skip > >>>> the first line in a disk image file. This has a few nice side > >>>> effects. The disk image is directly executable and it makes it very > >>>> clear to the user that they have to trust the disk image. The other > >>>> nice thing is that it would work with file formats other than qcow2. > >>> Well, it would be nice to align the disk image to a sector boundary > >>> (or, better, a page boundary). But yes, a very good idea. > >> That has the very nice side effect of allowing you to edit the command > >> line with a text editor provided you don't cross the sector boundary. > >> Filling with spaces would be pretty nice. > >> > > > > > > Its a bad idea. Either have a line terminated file, or a pure binary > > file, but don't mix them. Besides firing up an editor to modify it > > being a royal pain, mystery breakages will occur when someone has their > > editor set to "insert mode" (which is the default) vs "overwrite mode" > > and doesn't notice those extra spaces moving beyond the 512-byte mark. > > how about xml appended to image file, and size of xml appended to that? > And a tool to easily extract/replace the xml. Just my $0.02... Keep it *simple*, please! -- Carlos A. M. dos Santos