[Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
Hi, I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment variables for a process to access via getenv() and friends. The QEMU Guest Agent (QGA) does not appear to quite fit the bill, at least not in its current form: The

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Denis V. Lunev
On 03/02/15 22:09, Gabriel L. Somlo wrote: Hi, I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment variables for a process to access via getenv() and friends. The QEMU Guest Agent (QGA) does not appear to quite fit the

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Eric Blake
On 02/03/2015 12:09 PM, Gabriel L. Somlo wrote: > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QGA) does not appear

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
Hi Denis, On Tue, Feb 03, 2015 at 10:14:03PM +0300, Denis V. Lunev wrote: > On 03/02/15 22:09, Gabriel L. Somlo wrote: >> >>I'm interested in adding a way for a host to pass environment variables >>into a qemu guest VM -- analogous to setting environment variables for >>a process to access via get

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Denis V. Lunev
On 03/02/15 23:14, Gabriel L. Somlo wrote: Hi Denis, On Tue, Feb 03, 2015 at 10:14:03PM +0300, Denis V. Lunev wrote: On 03/02/15 22:09, Gabriel L. Somlo wrote: I'm interested in adding a way for a host to pass environment variables into a qemu guest VM -- analogous to setting environment vari

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Michael Roth
Quoting Gabriel L. Somlo (2015-02-03 13:09:22) > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QGA) does not appear

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
On Tue, Feb 03, 2015 at 12:26:47PM -0700, Eric Blake wrote: > On 02/03/2015 12:09 PM, Gabriel L. Somlo wrote: > > Hi, > > > > I'm interested in adding a way for a host to pass environment variables > > into a qemu guest VM -- analogous to setting environment variables for > > a process to access v

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
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 act

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Denis V. Lunev
On 04/02/15 00:38, Gabriel L. Somlo wrote: 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 "

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Michael Roth
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

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-03 Thread Gabriel L. Somlo
On Wed, Feb 04, 2015 at 12:49:22AM +0300, Denis V. Lunev wrote: > On 04/02/15 00:38, Gabriel L. Somlo wrote: > >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 loo

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > Hi, > > I'm interested in adding a way for a host to pass environment variables > into a qemu guest VM -- analogous to setting environment variables for > a process to access via getenv() and friends. > > The QEMU Guest Agent (QG

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Tue, Feb 03, 2015 at 04:38:59PM -0500, Gabriel L. Somlo wrote: > 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 m

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
Hi Daniel, On Wed, Feb 04, 2015 at 09:31:32AM +, Daniel P. Berrange wrote: > On Tue, Feb 03, 2015 at 04:38:59PM -0500, Gabriel L. Somlo wrote: > > 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 >

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 10:20:14AM -0500, Gabriel L. Somlo wrote: > Hi Daniel, > > On Wed, Feb 04, 2015 at 09:31:32AM +, Daniel P. Berrange wrote: > > On Tue, Feb 03, 2015 at 04:38:59PM -0500, Gabriel L. Somlo wrote: > > > On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote: > > > >

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Christopher Covington
Hi Gabriel, Summary up top, why I like the approach below. On 02/03/2015 02:09 PM, Gabriel L. Somlo wrote: > Hi, > For this functionality to really resemble the way environment variables > are used, environment information should be provided as part of the QEMU > command line, without the requir

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
On Wed, Feb 04, 2015 at 03:24:32PM +, Daniel P. Berrange wrote: > Yes, there is some overhead in setting up QEMU on the host to provide > the data cloud-init needs, but it isn't all that difficult. For example > Rich Jones describes how to setup a virtual disk for cloud-init > > > https://r

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Richard W.M. Jones
On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > qemu-system-x86_64 -guest-env="VAR1=value1;VAR2=value 2" -hda image.qcow2 libguestfs does this already by passing a few environment variables on the kernel command line. This requires a Linux guest kernel and that you're usin

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Gabriel L. Somlo
On Wed, Feb 04, 2015 at 04:00:05PM +, Richard W.M. Jones wrote: > On Tue, Feb 03, 2015 at 02:09:22PM -0500, Gabriel L. Somlo wrote: > > qemu-system-x86_64 -guest-env="VAR1=value1;VAR2=value 2" -hda > > image.qcow2 > > libguestfs does this already by passing a few environment variables on

Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables"

2015-02-04 Thread Daniel P. Berrange
On Wed, Feb 04, 2015 at 10:59:18AM -0500, Gabriel L. Somlo wrote: > On Wed, Feb 04, 2015 at 03:24:32PM +, Daniel P. Berrange wrote: > > Yes, there is some overhead in setting up QEMU on the host to provide > > the data cloud-init needs, but it isn't all that difficult. For example > > Rich Jone