]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Allow passing of command line args to LXC container
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 3 Oct 2011 17:37:47 +0000 (18:37 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 4 Oct 2011 13:15:09 +0000 (14:15 +0100)
commit652f88714454767a9c93bbb71740b897df8a795e
treed3d5a41385f69911be361341bc9abf6e47a3874a
parent6cc9ee9b18788d57971eee81f3183fcd89b0dc24
Allow passing of command line args to LXC container

When booting a virtual machine with a kernel/initrd it is possible
to pass command line arguments using the <cmdline>...args...</cmdline>
element in the guest XML. These appear to the kernel / init process
in /proc/cmdline.

When booting a container we do not have a custom /proc/cmdline,
but we can easily set an environment variable for it. Ideally
we could pass individual arguments to the init process as a
regular set of 'char *argv[]' parameters, but that would involve
libvirt parsing the <cmdline> XML text. This can easily be added
later, even if we add the env variable now

* docs/drvlxc.html.in: Document env variables passed to LXC
* src/conf/domain_conf.c: Add <cmdline> to be parsed for
  guests of type='exe'
* src/lxc/lxc_container.c: Set LIBVIRT_LXC_CMDLINE env var
docs/drvlxc.html.in
src/conf/domain_conf.c
src/lxc/lxc_container.c