* Making qemu images executable (and store command line arguments in them =P)
@ 2007-08-15 22:52 Jorge Lucángeli Obes
[not found] ` <59abf66e0708151552r6192f7e1he7ebe5bffd49525f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jorge Lucángeli Obes @ 2007-08-15 22:52 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
qemu-devel-qX2TKyscuCcdnm+yROfE0A
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.
The '#!' trick works nice with scripts, but I don't see it playing
very well with images. ¿Comments? ¿Pointers?
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/
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <59abf66e0708151552r6192f7e1he7ebe5bffd49525f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [Qemu-devel] Making qemu images executable (and store command line arguments in them =P) [not found] ` <59abf66e0708151552r6192f7e1he7ebe5bffd49525f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2007-08-15 23:52 ` Mark Williamson 2007-08-16 5:21 ` [kvm-devel] " Avi Kivity [not found] ` <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org> 2007-08-16 4:22 ` H. Peter Anvin 1 sibling, 2 replies; 6+ messages in thread From: Mark Williamson @ 2007-08-15 23:52 UTC (permalink / raw) To: qemu-devel-qX2TKyscuCcdnm+yROfE0A Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f > 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). > 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! 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!). Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! ------------------------------------------------------------------------- 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/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [kvm-devel] Making qemu images executable (and store command line arguments in them =P) 2007-08-15 23:52 ` [Qemu-devel] " Mark Williamson @ 2007-08-16 5:21 ` Avi Kivity [not found] ` <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org> 1 sibling, 0 replies; 6+ messages in thread From: Avi Kivity @ 2007-08-16 5:21 UTC (permalink / raw) To: Mark Williamson; +Cc: kvm-devel, qemu-devel 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org>]
* Re: [Qemu-devel] Making qemu images executable (and store command line arguments in them =P) [not found] ` <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org> @ 2007-08-16 16:11 ` Andreas Färber 0 siblings, 0 replies; 6+ messages in thread From: Andreas Färber @ 2007-08-16 16:11 UTC (permalink / raw) To: qemu-devel-qX2TKyscuCcdnm+yROfE0A Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Am 16.08.2007 um 01:52 schrieb Mark Williamson: > 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!). Q uses the extension .qvm on an ordinary directory containing an XML configuration file and the image(s), so that double-clicking the directory opens the guest with Q. Can GNOME/KDE only do that for files so that an archive is necessary? Andreas ------------------------------------------------------------------------- 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/ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Making qemu images executable (and store command line arguments in them =P) [not found] ` <59abf66e0708151552r6192f7e1he7ebe5bffd49525f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2007-08-15 23:52 ` [Qemu-devel] " Mark Williamson @ 2007-08-16 4:22 ` H. Peter Anvin [not found] ` <46C3D109.3080807-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: H. Peter Anvin @ 2007-08-16 4:22 UTC (permalink / raw) To: Jorge Lucángeli Obes Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, qemu-devel-qX2TKyscuCcdnm+yROfE0A Jorge Lucángeli Obes wrote: > > The '#!' trick works nice with scripts, but I don't see it playing > very well with images. ¿Comments? ¿Pointers? > Well, you can make it work with a header (you just have to pad it out to a fixed length or use a variable-offset format), but binfmt_misc might be a better choice. -hpa ------------------------------------------------------------------------- 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/ ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <46C3D109.3080807-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>]
* Re: [Qemu-devel] Re: Making qemu images executable (and store command line arguments in them =P) [not found] ` <46C3D109.3080807-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org> @ 2007-08-16 5:23 ` Avi Kivity 0 siblings, 0 replies; 6+ messages in thread From: Avi Kivity @ 2007-08-16 5:23 UTC (permalink / raw) To: qemu-devel-qX2TKyscuCcdnm+yROfE0A Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f H. Peter Anvin wrote: > Jorge Lucángeli Obes wrote: > >> The '#!' trick works nice with scripts, but I don't see it playing >> very well with images. ¿Comments? ¿Pointers? >> >> > > Well, you can make it work with a header (you just have to pad it out to > a fixed length or use a variable-offset format), but binfmt_misc might > be a better choice. > > binfmt_misc is Linux specific. And while kvm is a Linux thing now, qemu isn't. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- 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/ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-16 16:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [kvm-devel] " Avi Kivity
[not found] ` <200708160052.51858.mark.williamson-kDbDZe0LBGWFxr2TtlUqVg@public.gmane.org>
2007-08-16 16:11 ` [Qemu-devel] " 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox