[libvirt-users] Setting environment variables for LXC Containers

Harish Vishwanath harish.shastry at gmail.com
Tue Dec 22 09:21:45 UTC 2015


Hello

Is there a way to set custom environment variables for LXC containers so
that it is available for all processes within the container?

The libvirt-lxc driver seems to be setting up only the below variables (as
per the docs), but there doesn't seem to be a way customize it.
containerThe fixed string libvirt-lxc to identify libvirt as the creator
container_uuidThe UUID assigned to the container by libvirtPATHThe fixed
string /bin:/usr/binTERMThe fixed string linuxHOMEThe fixed string /

In addition to the standard variables, the following libvirt specific
environment variables are also provided
LIBVIRT_LXC_NAMEThe name assigned to the container by libvirt
LIBVIRT_LXC_UUIDThe UUID assigned to the container by libvirt
LIBVIRT_LXC_CMDLINEThe unparsed command line arguments specified in the
container configuration. Use of this is discouraged, in favour of passing
arguments directly to the container init process via the initarg config
element.


I am looking for something similar to this:
https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html
(lxc.environment)

Regards,
Harish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20151222/fb3c3685/attachment.htm>


More information about the libvirt-users mailing list