[libvirt] [PATCH] Expose name + UUID to LXC containers via env variables
Eric Blake
eblake at redhat.com
Tue Feb 22 14:50:43 UTC 2011
On 02/22/2011 07:08 AM, Daniel P. Berrange wrote:
> When spawning 'init' in the container, set
>
> LIBVIRT_LXC_UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
> LIBVIRT_LXC_NAME=YYYYYYYYYYYY
>
> to allow guest software to detect & identify that they
> are in a container
Sounds reasonable. Does virt-what know to look for these yet?
> @@ -109,6 +124,8 @@ static int lxcContainerExecInit(virDomainDefPtr vmDef)
> const char *const envp[] = {
> "PATH=/bin:/sbin",
> "TERM=linux",
> + uuidenv,
> + nameenv,
> NULL,
> };
ACK, but why aren't we using virCommand yet?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110222/d9b7e613/attachment-0001.sig>
More information about the libvir-list
mailing list