From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IK0EQ-00089x-Oc for qemu-devel@nongnu.org; Sat, 11 Aug 2007 19:18:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IK0EP-00089h-Cc for qemu-devel@nongnu.org; Sat, 11 Aug 2007 19:18:54 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IK0EP-00089e-7g for qemu-devel@nongnu.org; Sat, 11 Aug 2007 19:18:53 -0400 Received: from wx-out-0506.google.com ([66.249.82.233]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IK0EO-0002d8-W7 for qemu-devel@nongnu.org; Sat, 11 Aug 2007 19:18:53 -0400 Received: by wx-out-0506.google.com with SMTP id h31so875929wxd for ; Sat, 11 Aug 2007 16:18:52 -0700 (PDT) Subject: Re: [Qemu-devel] [PATCH 4/4][RFC] Add logic to QEMU to read command line options from qcow2 images From: Anthony Liguori In-Reply-To: <46BE29F9.9050904@ecs.soton.ac.uk> References: <59abf66e0708081124g14901b01i841b70d17ae1e097@mail.gmail.com> <59abf66e0708081252of2948d7we85c9084bad245d4@mail.gmail.com> <46BDFA90.4070400@ecs.soton.ac.uk> <46BE138D.7000500@codemonkey.ws> <46BE29F9.9050904@ecs.soton.ac.uk> Content-Type: text/plain Date: Sat, 11 Aug 2007 18:17:48 -0500 Message-Id: <1186874268.11306.1.camel@squirrel> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Sat, 2007-08-11 at 22:28 +0100, Philip Boulain wrote: > > Yes, I think that another argument should be required as Dan suggested > > although I'd like something more explicit like "-read-args-from-image". > > In the case where the image was directly executable, it would be > > embedded as part of the interpreter arguments. > > This works, so long as qemu disregards "-read-args-from-image" unless it's > being called as an interpreter. Otherwise, you've put the lock and the key in > the same place. :) > > If an image says: > #!/whatever/qemu -read-args-from-image > -curious-and-interesting-flags > > This should use those flags: > $ ./image.qcow2 > > And this shouldn't, because you don't need to have made it executable: > $ qemu -hda image.qcow2 > > (But this would:) > $ qemu -read-args-from-image -hda image.qcow2 Yes. This is exactly what I think the behavior ought to be. > (Side thought: presumably, we're assuming that the in-file and on-command-line > arguments are unioned, ideally with the latter taking precidence if mutually > exclusive.) Yup, I was thinking the same thing too. Once the KVM wiki comes back online I'll write something up on a wiki page. Regards, Anthony Liguori > >> This also doesn't apply outside of UNIX-like environments, e.g. > >> Windows... > > I think this is covered by requiring the additional argument. > > Agreed. > > LionsPhil > >