Received: from eggs.gnu.org ([2001:4830:134:3::10]:49032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ2MW-0006vS-KP for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:59:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ2MP-0001PV-KK for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:59:32 -0500 Received: from mail-qa0-x230.google.com ([2607:f8b0:400d:c00::230]:46901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ2MP-0001PM-Ef for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:59:25 -0500 Received: by mail-qa0-f48.google.com with SMTP id v8so1704879qal.7 for ; Wed, 04 Feb 2015 07:59:25 -0800 (PST) Date: Wed, 4 Feb 2015 10:59:18 -0500 From: "Gabriel L. Somlo" Message-ID: <20150204155917.GA16281@HEDWIG.INI.CMU.EDU> References: <20150203190921.GR3354@HEDWIG.INI.CMU.EDU> <20150203201112.6410.67335@loki> <20150203213858.GU3354@HEDWIG.INI.CMU.EDU> <20150204093132.GJ3032@redhat.com> <20150204152013.GW3354@HEDWIG.INI.CMU.EDU> <20150204152432.GZ3032@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150204152432.GZ3032@redhat.com> Subject: Re: [Qemu-devel] RFC: Proposal to add QEMU "Guest Environment Variables" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Michael Roth , qemu-devel@nongnu.org On Wed, Feb 04, 2015 at 03:24:32PM +0000, 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://rwmj.wordpress.com/2013/12/10/creating-a-cloud-init-config-disk-for-non-cloud-boots/ > > Given the prevalence of cloud-init across distros, I think you'll be hard > pressed to get them to support an alternative method, even if it is a bit > simpler at the QEMU setup level. Have a look at this: http://www.vmware.com/pdf/Scripting_API_23.pdf (page 36, GuestInfo Variables). It's a rather generic, flexible feature. Some people use it for early boot, but that's just one of the many use cases, so maybe focusing on "how to implement early boot configuration" is going a bit off on a tangent :) I'd like to add that mechanism (or at least the host->guest bits) to qemu, for "feature parity". That should be a good thing, making it easier to port "whatever" to qemu, without having to massively rearchitect it to work around a missing feature... Also, it's really non-intrusive. At this point, I could implement it by passing environment strings in via "-smbios file=./Type11EnvStrBlob", and read them on the guest side via 'dmidecode -t11', with some grep and awk magic thrown in for good measure :) But I'd really love to wrap it in some syntactic sugar, so that it could eventually be exposed via virsh and virt-manager, so that people used to VMWare and guestinfo variables can migrate things over to qemu/kvm in a relatively painless way. And some of them will use it for early boot, but hey, who am I to argue. I'm all about "mechanism", and prefer leaving "policy" to the user :) Thanks much, --Gabriel