On 03/16/2011 08:54 AM, John R. Dunning wrote:
From: David Lutterkort<lutter@redhat.com> Date: Tue, 15 Mar 2011 17:05:24 -0700 On Tue, 2011-03-15 at 14:46 -0400, Chris Lalancette wrote: > On 03/15/11 - 01:35:53PM, Ian Main wrote: > > > 3. We believe we can arrange to pass a small snippet of config data > > > in at launch time, to point a booting instance at some source of > > > further config. > > > > Kernel boot params, yes. > > Note that this won't work. In general, you can't add kernel boot params to > a guest, because we don't direct-boot the kernel. We boot the emulated BIOS, > which calls grub, which calls the kernel. > > Luckily there is a workaround. We can stuff some data into the SMBIOS tables > during launch time, and use that as our injection mechanism instead. There's also door #3, which would be hugely preferrable from an API POV: using kpartx^W libguestfs to directly inject files into the image. This is the approach Rackspace takes; IOW, we wouldn't introduce yet another paradigm of how to inject user data into an instance.
Do you mean pry open the image a few ms before launch, frob something in it, then launch?
That's ok if you've got a backend which doesn't do, for instance, COW, while running multiple instances from a single image file.
I think you want to do something which ties to the instance, not the image.
I imagine you would crack open the instance's disk, not the shared COW, forcing a little C'ing.
Best,
matt
Besides, if we're arguing from the API point of view, who cares what the underlying implementation is? One of the main points of having an API in the first place is to allow for hiding wacky implementation details, especially when there are multiple implementations involved.
SMBIOS is fine for internal instrumentation (e.g., where to report IP address), but not for generic user data.
I think all that's being proposed to go in smbios is a 32-bit dingus (ip address of server) and a somewhat longer dingus for instance UID. If we need 128 bits for that, it's 160 bits total. Is that acceptable to stash in smbios at boot time?