From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"
Date: Tue, 03 Feb 2015 16:08:45 -0600 [thread overview]
Message-ID: <20150203220845.6410.62846@loki> (raw)
In-Reply-To: <20150203213858.GU3354@HEDWIG.INI.CMU.EDU>
Quoting Gabriel L. Somlo (2015-02-03 15:38:59)
> On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote:
> >
> > This does seem like useful functionality, but I think I'd like to know
> > more about the actual use-cases being looked at.
>
> The proposed functionality is mostly equivalent to that offered by
> "GuestInfo variables". So yes, initial activation scripts :)
>
> > Is this mostly about executing initial activation scripts? Because after
> > that point, a key-value store can be managed through the
> > guest-file-read/write interfaces for anything on the guest-side that's
> > interested in these variables.
> >
> > Even activation could be done using this approach, where the
> > scripts start QGA and wait for the host to coordinate the initial creation
> > of the file containing those variables, then setting a file marker that
> > allows activation to proceed. And if that seems wonky, I'm fairly sure you
> > could script the creation of the initial key-value store prior to starting
> > the guest using libguestfs:
> >
> > http://libguestfs.org/
>
> Specifically, I'm trying to port to QEMU a simulation/training setup
> where multiple VMs are started from the same base image, and guestinfo
> environment variables help each instance determine its "personality".
>
> Editing the disk image is not feasible, since the idea is to share the
> base disk image across multiple VMs. And needing to connect to each VM
Well, I assume by shared a base image you mean using a template image
as the backing image for a COW image allocated for each guest prior
to activation? As long as the editing is done against the COW image rather
than the backing image it should work. Maybe it's not ideal, but it's
feasible.
I hadn't really considered the SMBIOS approach though. That might be
more straightforward to get the initial store to the guest.
> after having started it, wait for it to bring up the QGA, then get it
> to accept environment variables, that's precisely the wonkiness I'm
> trying to avoid :)
Understandable :)
>
> I can certainly start small and implement read-only, host->guest startup
> time values (the smbios type11 strings plus a way to read them via a
> guest-side binary associated with a guest-tools package), and we can
> decide whether we want to support "set-env" operations and exporting
> set-env and get-env via the agent at a later stage. That functionality
> is available with GuestInfo variables, but the system I'm trying to port
> to QEMU doesn't require it as far as I can tell.
Seems like a reasonable start to me.
>
> Thanks much,
> --Gabriel
>
> >
> > I think we'd need a very strong argument to bake what seems to be
> > high-level guest management tasks into QEMU. If that can
> > avoided with some automated image modifications beforehand that seems
> > to me the more reasonable approach. Libvirt could ostensibly even
> > handle the task of writing those XML strings into the image's
> > key-value store to make management easier, but I suspect even that is
> > a bit too low in the stack for this level of management.
next prev parent reply other threads:[~2015-02-03 22:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 19:09 [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables" Gabriel L. Somlo
2015-02-03 19:14 ` Denis V. Lunev
2015-02-03 20:14 ` Gabriel L. Somlo
2015-02-03 20:23 ` Denis V. Lunev
2015-02-03 19:26 ` Eric Blake
2015-02-03 20:54 ` Gabriel L. Somlo
2015-02-03 20:11 ` Michael Roth
2015-02-03 21:38 ` Gabriel L. Somlo
2015-02-03 21:49 ` Denis V. Lunev
2015-02-03 22:14 ` Gabriel L. Somlo
2015-02-03 22:08 ` Michael Roth [this message]
2015-02-04 9:31 ` Daniel P. Berrange
2015-02-04 15:20 ` Gabriel L. Somlo
2015-02-04 15:24 ` Daniel P. Berrange
2015-02-04 15:59 ` Gabriel L. Somlo
2015-02-04 16:12 ` Daniel P. Berrange
2015-02-04 9:29 ` Daniel P. Berrange
2015-02-04 15:55 ` Christopher Covington
2015-02-04 16:00 ` Richard W.M. Jones
2015-02-04 16:06 ` Gabriel L. Somlo
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=20150203220845.6410.62846@loki \
--to=mdroth@linux.vnet.ibm.com \
--cc=gsomlo@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).