qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Jorge Lucángeli Obes" <t4m5yn@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4][RFC] Add logic to QEMU to read command line options from qcow2 images
Date: Thu, 9 Aug 2007 16:07:24 +0100	[thread overview]
Message-ID: <20070809150724.GC15140@redhat.com> (raw)
In-Reply-To: <46BB2A99.3030609@codemonkey.ws>

On Thu, Aug 09, 2007 at 09:54:17AM -0500, Anthony Liguori wrote:
> Daniel P. Berrange wrote:
> >On Wed, Aug 08, 2007 at 04:52:58PM -0300, Jorge Luc?ngeli Obes wrote:
> >  
> >>This patch makes QEMU check for command line options stored in qcow2 
> >>images.
> >>    
> >
> >I think it is a bad idea from a security POV to automatically extract & 
> >use command line args from  a disk image like this without the admin 
> >explicitly requesting this capability. 
> >
> >eg If I grabbed a demo disk image from a vendors' or community website I 
> >would
> >certainly not trust whatever args may happen to be embedded in the disk 
> >image
> >and thus do not want QEMU to be automatically running using them.
> >
> >I'd recommend having some command line flag to turn this capability on. For
> >example a '--args PATH-TO-DISK' flag,
> >
> >  qemu --args $HOME/fedora.qcow
> >  
> 
> That's pretty nasty.  How do you specify which disk this is then?  I do 

Well that's the same problem you have with the current patch - it just assumes
you have a single disk & its going to be hda.

> agree with you that allowing arbitrary command line arguments in an 
> image file is probably a bad idea.  I think the general idea of being 
> able to launch a single image is useful but I suspect this is not the 
> right way to do it.
> 
> What are some people thinking would want to be stored in the file?  Most 
> of the command line options are more host specific than guest specific I 
> think.  Maybe we can store a pseudo-config instead that only contains a 
> subset of parameters (and therefore, wouldn't pose a security risk)?

Yeah that's a much more open ended & interesting problem to address. I
personally wouldn't store command line arguments in the image at all.
I think we'd be better off providing a generic metadata  description of
the capabilities / requirements of the guest OS/kernel inside the image.
So any virtualization platform could read the metadata, determine whether
the guest is supported & then boot it with appropriate commands. 

Once you have a good metadata description, there's many options for how you
distribute it - in the qcow image, or in tar.gz containing the image, the 
metdata & any other relevant bits. We've been trying to prototype a sample
metdata description &  a virt-image tool for launching an image based on
its metadata using libvirt.

   http://people.redhat.com/dlutter/virt-image/

The same metadata could be used to build a qemu command line directly for
the non-libvirt usage cases.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

  reply	other threads:[~2007-08-09 15:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <59abf66e0708081124g14901b01i841b70d17ae1e097@mail.gmail.com>
2007-08-08 19:52 ` [Qemu-devel] [PATCH 4/4][RFC] Add logic to QEMU to read command line options from qcow2 images Jorge Lucángeli Obes
2007-08-08 20:24   ` Daniel P. Berrange
2007-08-09 14:54     ` Anthony Liguori
2007-08-09 15:07       ` Daniel P. Berrange [this message]
2007-08-09 20:16       ` Avi Kivity
2007-08-09 20:25         ` Anthony Liguori
2007-08-09 20:30           ` Avi Kivity
2007-08-09 20:32             ` Anthony Liguori
2007-08-09 20:39               ` Avi Kivity
2007-08-09 20:44               ` Brian Wheeler
2007-08-09 20:49                 ` Anthony Liguori
2007-08-10  3:51                 ` dmc
2007-08-10 13:26                   ` Carlos A. M. dos Santos
2007-08-09 20:55         ` Brian Wheeler
2007-08-10  0:48           ` Anthony Liguori
2007-08-11 17:11   ` andrzej zaborowski
2007-08-11 18:06     ` Philip Boulain
2007-08-11 19:08       ` Christian Brunschen
2007-08-11 19:53         ` Anthony Liguori
2007-08-11 19:52       ` Anthony Liguori
2007-08-11 21:28         ` Philip Boulain
2007-08-11 23:17           ` Anthony Liguori
2007-08-13  5:34             ` Jorge Lucángeli Obes
2007-08-13 15:15               ` [kvm-devel] " Anthony Liguori
2007-08-11 19:49     ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070809150724.GC15140@redhat.com \
    --to=berrange@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=t4m5yn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).