From: Avi Kivity <avi@qumranet.com>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org
Subject: Re: [kvm-devel] Making qemu images executable (and store command line arguments in them =P)
Date: Thu, 16 Aug 2007 08:21:39 +0300 [thread overview]
Message-ID: <46C3DEE3.3040909@qumranet.com> (raw)
In-Reply-To: <200708160052.51858.mark.williamson@cl.cam.ac.uk>
Mark Williamson wrote:
>> I've been giving some thought to Anthony's idea:
>>
>> http://kvm.qumranet.com/kvmwiki/Specs/StoringCommandLineInImage
>>
>> However, maybe I'm just too much on vacations, but I don't seem to
>> come up with a nice way of doing this. Everything keeps coming back to
>> creating a new 'container' image format and then implementing block
>> layer functions that only add the number of sectors occupied by the
>> command-line to the read and write calls made by QEMU, and then just
>> relay those calls to the image-specific functions. That doesn't sound
>> very efficient.
>>
>
> It's not necessarily that pretty, but I wouldn't have thought that adding a
> simple offset to block operations will have a measurable performance impact
> (given the latencies involved in block accesses anyhow, and the amount of
> data transferred each time).
>
>
Right.
>> The '#!' trick works nice with scripts, but I don't see it playing
>> very well with images. ¿Comments? ¿Pointers?
>>
>
> Well, it's not really necessary, but it would be darn cool :-) Another cool
> (but admittedly twisted - get the brain soap ready!) thing to do would be to
> statically link a qemu, and then include a virtual machine config and disks
> in a section of the elf file (inspired by glick:
> http://blogs.gnome.org/alexl/2007/08/07/experiments-with-runtime-less-app-bundles/).
> So then you'd have an "executable" VM image which doesn't need a Qemu runtime
> to be available. There are various variations you could do on this basic
> premise in order to make the file you carry around less terrifyingly huge!
>
That would make the VM not transportable (think moving from an x86_64
host to an i386 host) and would tie it to a particular version of kvm
userspace.
> Anyhow, enough of my random ideas... I was thinking about container formats.
>
> I've missed some of the discussion, but wouldn't tar be an obvious choice? It
> can expand easily out to a directory hierarchy containing config file and
> multiple virtual disk files, there are standard tools that can manipulate it
> and standard libraries that can be used by Qemu in order to get at the
> contents. Only problem I see with this approach is that sparse file handling
> might get a bit strange (using real sparse files vs using tar's
> represesntation of sparse files vs compatibility with tars that don't support
> them!).
>
Also it can't be used in-place, like Anthony's header or the
metadata-in-snapshot idea.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2007-08-16 5:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 22:52 Making qemu images executable (and store command line arguments in them =P) Jorge Lucángeli Obes
[not found] ` <59abf66e0708151552r6192f7e1he7ebe5bffd49525f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-15 23:52 ` [Qemu-devel] " Mark Williamson
2007-08-16 5:21 ` Avi Kivity [this message]
[not found] ` <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org>
2007-08-16 16:11 ` Andreas Färber
2007-08-16 4:22 ` H. Peter Anvin
[not found] ` <46C3D109.3080807-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-08-16 5:23 ` [Qemu-devel] " Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2007-08-16 17:05 [Qemu-devel] " Ben Taylor
2007-08-17 12:40 ` Avi Kivity
2007-08-17 13:09 ` [kvm-devel] " Christian Brunschen
2007-08-19 10:35 ` [Qemu-devel] " Avi Kivity
[not found] ` <99222E0B-B4B8-4D5A-A557-1A9CF113E9E7@jump-ing.de>
[not found] ` <46C824B2.1040300@qumranet.com>
2007-08-19 13:14 ` [kvm-devel] " Christian Brunschen
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=46C3DEE3.3040909@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=qemu-devel@nongnu.org \
/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