Commit Graph

254 Commits

Author SHA1 Message Date
Stéphane Graber
211e51e81e
lxc-info: Allow printing IP addresses
This adds a new -i flag to lxc-info to print the container's IP
addresses using get_ips().

Example:
$ lxc-info -n lxc-dev -s -p -i
state:  RUNNING
pid:    21331
ip:     10.0.3.165
ip:     2607:f2c0:f00f:2751:e9ca:842f:efa9:97d1
ip:     2607:f2c0:f00f:2751:216:3eff:fe3a:f1c1

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-09-27 09:31:17 -04:00
Dwight Engen
fe4de9a66d refactor AppArmor into LSM backend, add SELinux support
Currently, a maximum of one LSM within LXC will be initialized and
used. If in the future stacked LSMs become a reality, we can support it
without changing the configuration syntax and add support for more than
a single LSM at a time to the lsm code.

Generic LXC code should note that lsm_process_label_set() will take
effect "now" for AppArmor, and upon exec() for SELinux.

- fix Oracle template mounting of proc and sysfs, needed when using SELinux

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-09-25 17:12:36 -05:00
KATOH Yasufumi
7cb14f34a9 doc: Japanese man pages is not generated when docbook-utils is used
Character encoding of Japanese man pages is UTF-8. But docbook-utils
can't treat it (and don't have --encoding option that use in
Makefile). So change to Japanese man pages is not generated when
docbook-utils is used.

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-25 09:50:26 -04:00
Stéphane Graber
9d0cda4f22 doc: Fixed my first name
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-09-23 15:30:45 -05:00
Stéphane Graber
faefa7f858 doc: Make everything use the @docdtd@ variable
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-09-23 15:30:35 -05:00
Stéphane Graber
8900b9eb25
Remove trailing whitespaces
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-18 14:40:20 -05:00
Serge Hallyn
813a483765 snapshots: add man page and fix up help info a bit.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-12 15:49:16 -05:00
Stéphane Graber
dd97408ae2 Fix some typos
Signed-off-by: KATOH Yasufumi karma@jazz.email.ne.jp
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-11 10:02:05 -04:00
KATOH Yasufumi
57da8c32f8 Add Japanese man pages.
Japanese man pages is installed under $mandir/ja.
At this time, it is based on version 0.9.0.
2013-09-10 18:19:20 -04:00
Serge Hallyn
1fb86a7cdc introduce lxc.cap.keep
The lxc configuration file currently supports 'lxc.cap.drop', a list of
capabilities to be dropped (using the bounding set) from the container.
The problem with this is that over time new capabilities are added.  So
an older container configuration file may, over time, become insecure.

Walter has in the past suggested replacing lxc.cap.drop with
lxc.cap.preserve, which would have the inverse sense - any capabilities
in that set would be kept, any others would be dropped.

Realistically both have the same problem - the sendmail capabilities
bug proved that running code with unexpectedly dropped privilege can be
dangerous.  This patch gives the admin a choice:  You can use either
lxc.cap.keep or lxc.cap.drop, not both.

Both continue to be ignored if a user namespace is in use.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-09-05 17:20:59 -05:00
Stéphane Graber
250b1eec71
licensing: Add missing headers and FSF address
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-03 14:33:03 -04:00
Stéphane Graber
840295ff4c
Fix some typos
Signed-off-by: Dmitry Shachnev <mitya57@ubuntu.com>
Reported-by: Vincent Ladeuil
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-08-30 11:43:19 -04:00
Stéphane Graber
55c76589fd
Remove all trailing whitespaces
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-08-19 14:37:20 +02:00
Serge Hallyn
fbbf51926e document new lxc-create btrfs behavior
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-08-15 15:37:30 -05:00
Serge Hallyn
baece28226 lxc.conf.sgml.in: note the arguments and environment variables passed to hooks
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-08-13 13:45:56 -05:00
Dwight Engen
1143ed392d add clonehostname hook
This hook script updates the hostname in various files under /etc in the
cloned container. In order to do so, the old container name is passed in
the LXC_SRC_NAME environment variable.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-07-10 14:08:43 -05:00
Dwight Engen
9c631ea7c2 allow lxc-info to get running container configuration
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-07-01 16:47:04 -05:00
Dwight Engen
b515981702 console API improvements
Add a higher level console API that opens a tty/console and runs the
mainloop as well. Rename existing API to console_getfd(). Use these in
the python binding.

Allow attaching a console peer after container bootup, including if the
container was launched with -d. This is made possible by allocation of a
"proxy" pty as the peer when the console is attached to.

Improve handling of SIGWINCH, the pty size will be correctly set at the
beginning of a session and future changes when using the lxc_console() API
will be propagated to it as well.

Refactor some common code between lxc_console.c and console.c. The variable
wait4q (renamed to saw_escape) was static, making the mainloop callback not
safe across threads. This wasn't a problem when the callback was in the
non-threaded lxc-console, but now that it is internal to console.c, we have
to take care of it. This is now contained in a per-tty state structure.

Don't attempt to open /dev/null as the console peer since /dev/null cannot
be added to the mainloop (epoll_ctl() fails with EPERM). This isn't needed
to get the console setup (and the log to work) since the case of not having
a peer at console init time has to be handled to allow for attaching to it
later.

Move signalfd libc wrapper/replacement to utils.h.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-06-12 15:53:08 -05:00
Serge Hallyn
eddaaafd1a implement loopback backing store
Create a loopfile backed container by doing:

	lxc-create -B loop -t template -n name

or

	lxc-clone -B loop -o dir1 -n loop1

The rootfs in the configuration file will be

	loop:/var/lib/lxc/loop1/rootdev

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-06-03 16:38:13 -05:00
Serge Hallyn
64f782ca69 lxc.conf.sgml.in: fill in missing configuration file statements
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-05-28 14:07:43 -05:00
Serge Hallyn
3e625e2d2e lxc-stop: use api, remove lxc_shutdown, extend lxc-stop functionality
implement c->reboot(c) in the api.

Also if the container is not running, return -2.  Currently
lxc-stop will return 0, so you cannot tell the difference
between successfull stopping and noop.

Per stgraber's email:

 - Remove lxc-shutdown
 - Change lxc-stop so that:
   * Default behaviour is to call shutdown(), wait 15s for STOPPED, if
not STOPPED, print a message to the user and call stop() [ NOTE:
actually 60 seconds per followup thread]
   * We have a -r option to reboot the container (with proper check that
the container indeed rebooted within the next 15s)
   * We have a -s option to shutdown the container without the automatic
fallback to stop()
   * Add a -k option allowing a user to just kill a container
(equivalent to old lxc-stop, no shutdown() call and no delay).

and update manpages.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-05-24 23:31:28 -05:00
Serge Hallyn
dc92f6c7ee document clone hooks
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-05-16 08:22:41 -05:00
Dwight Engen
d9e80daf54 doc/lxc.conf minor clarifications
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-05-16 07:18:09 -05:00
Dwight Engen
8d06bd135a lxc-monitor multiple paths
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-05-08 13:00:08 -05:00
Serge Hallyn
9be5377379 implement backend drivers and container clone API (v3)
1. commonize waitpid users to use a single helper.  We frequently want
to run something in a clean namespace, or fork off a script.  This
lets us keep the function doing fork:(1)exec(2)waitpid simpler.

2. start a blockdev backend implementation.  This will be used for
mounting, copying, and snapshotting container filesystems.

3. implement btrfs, lvm, directory, and overlayfs backends.

4. For overlayfs, support a new lxc.rootfs format of
'bdevtype:<extra>'.  This means you can now use overlayfs-based
containers without using lxc-start-ephemeral, by using
lxc.rootfs = overlayfs:/readonly-dir:writeable-dir

5. add a set of simple clone testcases

6. Write a new lxc_clone.c based on api clone.

Still to do (there's more, but off top of my head):

1. support zfs, aufs
2. have clone handle other mount entries (right now it only clones
the rootfs)
3. python, lua, and go bindings (not me :)
4. lxc-destroy: if lvm backing store, check for snapshots of it.
   (what about directories which have overlayfs clones?)

Changes since v2:
	Initialize random generator when picking new macaddr (reported
	  by caglar@10ur.org)
	Fix wrong use of bitmask flags
	On copy-clone of btrfs, create a subvolume
	lxc_clone.c: respect the command line usage of the old script
	lxc-clone(1): update documentation
	Refuse to try changing backing stores expect to overlayfs, as
	  it is not implemented (yet) anyway.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>

Conflicts:
	src/lxc/utils.h
2013-04-30 09:12:42 -05:00
Dwight Engen
7f95145833 fix building docs
Commit 69fe23ff added checking for the older docbook2man back into
configure, but this breaks building the docs on at least Oracle Linux and
Fedora when docbook2X is not installed as docbook2man will be found but the
docs don't actually build with that tool.

This change makes it so the docs can be built with either the older
docbook2man or the newer 2X tools by using configure to set the dtd
string to an appropriate value depending on use of docbook2man or
db2x_docbook2man.

Also fixed a small error in lxc-destroy.sgml.in that was noticed
by the old tools.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-04-30 08:19:37 -05:00
Stéphane Graber
6320e49454
lxc.conf: Add reference to capabilities manpage
This adds a reference to capabilities(7) to the lxc.conf manpage.

Signed-off-by: Tomáš Pospíšek <tpo_deb@sourcepole.ch>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-04-25 17:31:34 +02:00
Dwight Engen
e51d489512
Allow multiple monitor clients
This fixes a long standing issue that there could only be a single
lxc-monitor per container.

With this change, a new lxc-monitord daemon is spawned the first time
lxc-monitor is called against the container and will accept connections
from any subsequent lxc-monitor.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-04-25 01:38:26 +02:00
Dwight Engen
1354f95287 minor documentation fixes / clarification
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-04-10 15:24:56 -05:00
Christian Seiler
799f96fdd8 lxc-attach: Implement --clear-env and --keep-env
This patch introduces the --clear-env and --keep-env options for
lxc-attach, that allows the user to specify whether the environment
should be passed on inside the container or not.

This is to be expanded upon in later versions, this patch only
introduces the most basic functionality.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-04-01 10:05:30 -04:00
Matthias Brugger
bb787bc51f lxc.sgml.in: Fix typo in man page.
This patch fixes a small typo in the man page.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-27 17:30:18 -04:00
Stéphane Graber
9a42db48e0 Fix 'make clean'
This is mostly to make debuild happy as it doesn't tolerate any
leftover file when building twice in a row.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-26 14:54:12 -04:00
Stéphane Graber
c13c0e08da EXTRA_DIST: Fix missing files with "make dist"
I recently noticed that the generated tarballs with "make dist"
were incomplete unless the configure script was run on a machine
with all possible build dependencies.

That's wrong as you clearly don't need those dependencies to generate
the tarball. This change fixes that.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-26 13:12:29 -04:00
Daniel Lezcano
9afe19d634 Change author email address
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2013-03-19 11:19:13 +01:00
Serge Hallyn
2f3f41d0d5 default kmsg symlinking to on, and document lxc.kmsg
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-03-13 08:55:11 -05:00
Alexander Vladimirov
a84b99323a Add lxc.stopsignal config option
I remember discussion about implementing proper way to shutdown
guests using different signals, so here's a patch proposal.
It allows to use specific signal numbers to shutdown guests
gracefully, for example SIGRTMIN+4 starts poweroff.target in
systemd.

Signed-off-by: Alexander Vladimirov <alexander.idkfa.vladimirov@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-12 17:06:50 -04:00
Dwight Engen
ac7725e7bb make [ug]id map ordering consistent with /proc/<nr>/[ug]id_map
The id ordering and case of u,g is also consistent with uidmapshift,
reducing confusion.

doc: Moved example to the the EXAMPLES section, and used values
corresponding to the defaults in the pending shadow-utils subuid patch.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-03-11 16:35:14 -04:00
Serge Hallyn
66b5034238 lxc-destroy man page: document --lxcpath option
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-03-04 19:54:12 -06:00
Stéphane Graber
0e21ea4b15 lxc-ls: Implement support for nested containers
Add initial support for showing and querying nested containers.

This is done through a new --nesting argument to lxc-ls and uses
lxc-attach to go look for sub-containers.

Known limitations include the dependency on setns support for the PID
and NETWORK namespaces and the assumption that LXCPATH for the sub-containers
matches that of the host.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-03-01 09:40:24 -05:00
Jäkel, Guido
6e2faa3724 A new option '--host' for lxc-ps
Allow for an additional --host parameter to lxc-ps hiding all processes running
in containers.

Signed-off-by: Guido Jäkel <G.Jaekel@dnb.de>
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-02-22 09:58:10 -05:00
Stéphane Graber
67e571de63 Introduce --lxcpath cmdline option, and make default_lxc_path() return const char *
For the lxc-* C binaries, introduce a -P|--lxcpath command line option
to override the system default.

With this, I can

    lxc-create -t ubuntu -n r1
    lxc-create -t ubuntu -n r1 -P /home/ubuntu/lxcbase
    lxc-start -n r1 -d
    lxc-start -n r1 -d -P /home/ubuntu/lxcbase
    lxc-console -n r1 -d -P /home/ubuntu/lxcbase
    lxc-stop -n r1

all working with the right containers (module cgroup stuff).

To do:
    * lxc monitor needs to be made to handle cgroups.
      This is another very invasive one.  I started doing this as
      a part of this set, but that gets hairy, so I'm sending this
      separately.  Note that lxc-wait and lxc-monitor don't work
      without this, and there may be niggles in what I said works
      above - since start.c is doing lxc_monitor_send_state etc
      to the shared abstract unix domain socket.
    * Need to handle the cgroup conflicts.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-02-19 11:52:44 -05:00
Stéphane Graber
4019712d19 Add missing manpages
This introduces manpages for:
 - lxc-checkconfig
 - lxc-device
 - lxc-info
 - lxc-netstat
 - lxc-shutdown (wasn't in Makefile)
 - lxc-start-ephemeral
 - lxc-version

This commit also sorts configure.ac and Makefile.am.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-02-10 23:17:05 -05:00
Serge Hallyn
810567bbbe add lxc-unshare man page, and make 'lxc-unshare -h' work.
Also fix some tabs-as-spaces in lxc_unshare.c itself.
lxc-unshare: run usage() on '-h'

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-02-08 18:36:07 -05:00
Serge Hallyn
11cddd70eb Add man page for lxc-clone
And doing so pointed out a bug in lxc-clone itself - it claims
default fssize is 2G.  It's not.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-02-08 18:22:33 -05:00
Dwight Engen
f080ffd7d6 add lua binding for the lxc API
The lua binding is based closely on the python binding. Also included are
a test program for excercising the binding, and an lxc-top utility for
showing statistics on running containers.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-01-28 18:04:08 -05:00
Serge Hallyn
f6d3e3e470 Implement userid mappings (enable user namespaces)
The 3.8 kernel now supporst uid mappings, so I believe it's appropriate
to proceed with this patchset.
The container config supports new entries of the form:
 lxc.id_map = U 100000 0 10000
 lxc.id_map = G 100000 0 10000
meaning map 'virtual' uids (in the container) 0-10000 to uids
100000-110000 on the host, and same for gids.  So long as there are
mappings specified in the container config, then CONFIG_NEWUSER will
be used when the container is cloned.  This means that container
setup is no longer done with root privilege on the host, only root
privilege in the container.  Therefore cgroup setup is moved from the
init task to the monitor task.

To use this patchset, you currently need to either use the raring
kernel at ppa:serge-hallyn/usern-natty, or build your own kernel
from either git://kernel.ubuntu.com/serge/quantal-userns.git.
(Alternatively you can use Eric's tree at the latest userns-always-map-*
branch at
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git
but you will likely want to at least enable tmpfs mounts in user namespaces)

You also need to chown the files in the container rootfs into the
mapped range.  There is a utility at
https://code.launchpad.net/~serge-hallyn/+junk/nsexec to do this.
uidmapshift does the chowning, while the container-userns-convert
script nicely wraps that program.  So I simply

	sudo lxc-create -t ubuntu -n r1
	sudo container-userns-convert r1 200000

will create a container which is shifted so uid 0 in the container
is uid 200000 on the host.

TODO: when doing setuid(0), need to only do that if 0 is one of the
ids we map to.  Similarly, when dropping capabilities, need to only
not do that if 0 is one of the ids we map to.  However, the question
of what to do for 'weird' containers in private user namespaces is
one I'm punting for later.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-01-15 12:09:33 -05:00
Michael H. Warfield
f7bee6c6f3 MAKEDEV call, add autodev hooks, add environment variables for hook scripts.
Ok...  Here's the patch again.  Since Serge is removing the loglevel
structure member, this patch no longer references that element.

From the original description:

1) Removes run_makedev() and the call to it from conf.c per discussion.

2) Adds an lxc.hook.autodev hook.

Note: This hook is very close (one routine level abstracted) from where
the run_makedev was called.  Anyone really rrreeeaaalllyyy needing
MAKEDEV can add it in with a small shim script to do whatever they want
under whatever distro they're using, so no functionality is lost there.

3) Added a number of environment variables for all the hook scripts to
reference to assist in execution.  Things like LXC_ROOTFS_MOUNT could be
very useful but others were added as well.  Room for more if anyone has
an itch.  All in one spot in lxc_start.c.

4) clearenv and putenv( "container=lxc" ) calls were moved to just after
the "start" hook in the container just prior to actually firing up the
container so we could use environment variables prior to that and have
them flushed them before firing up init.  Nice side effect is that you
can define environment variables and then call lxc-start and have them
show up in those hooks scripts.

5) I actually DID update the man page for lxc.conf!  I guess I lied when
I said I wouldn't get that done.

[... and ...]

I added the rcfile to the lxc_conf structure as suggested and moved the
setenv bundle from lxc-start.c over to start.c just prior to calling
run_lxc_hooks for the pre-start hook.

Signed-off-by: Michael H. Warfield <mhw@WittsEnd.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-01-14 14:04:09 -06:00
Dwight Engen
768487891f document lxc-console escape sequence and argument
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-01-08 12:05:43 -05:00
Dwight Engen
596a818d4b separate console device from console log
lxc-start -c makes the named file/device the container's console, but using
this with a regular file in order to get a log of the console output does
not work very well if you also want to login on the console. This change
implements an additional option (-L) to simply log the console's output to
a file.

Both options can be used separately or together. For example to get a usable
console and log: lxc-start -n name -c /dev/tty8 -L console.log

The console state is cleaned up more when lxc_delete_console is called, and
some of the clean up paths in lxc_create_console were fixed.

The lxc_priv and lxc_unpriv macros were modified to make use of gcc's local
label feature so they can be expanded more than once in the same function.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-01-02 18:08:12 -05:00
Stéphane Graber
6a85cf9124 Install legacy scripts when built without python.
Re-introduce the old lxc-ls script and manpage under a new legacy
sub-directory.

Those will be installed in place of their python equivalent when LXC
is built without --enable-python.

Any other script ported to python should be added to those lists.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2012-12-04 14:01:30 -05:00
Stéphane Graber
4e7186c535 Rewrite lxc-ls in python
This rewrite is mostly compatible with the shell version.
--active and -1 still work and behave as they used to.

This adds --running, --stopped and --frozen as state filters.

A new "fancy" view is also implemented (can be used with --fancy) and
will show containers in a column-based interface with the following fields:
 - name
 - state
 - ipv4
 - ipv6
 - pid of init

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2012-12-04 14:00:56 -05:00
Stéphane Graber
f79d43bbe7 Remove all trailing whitespaces.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-26 12:08:13 -05:00
Stéphane Graber
ad493d03fe lxc.conf.sgml.in: Fix typo
Fix a typo in the previous lxc.conf.sgml.in change.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-26 11:45:28 -05:00
Serge Hallyn
c6883f383e Add lxc.autodev
Add a container config option to mount and populate /dev in a container.

We might want to add options to specify a max size for /dev other than
the default 100k, and to specify other devices to create.  And maybe
someone can think of a better name than autodev.

Changelog: Don't error out if we couldn't mknod a /dev/ttyN.
Changelog: Describe the option in lxc.conf manpage.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-26 10:02:47 -06:00
Natanael Copa
3114c98242 lxc-start: add option -p, --pidfile=FILE
Add option to create a pidfile for lxc-start. This is helpful for
init scripts and process monitors when running as daemon.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-15 10:50:56 -05:00
Stéphane Graber
24b292c917 lxc-create: Support passing a full path to -t
In some cases it may be useful to pass a full path to an executable
template script directly to lxc-create.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 16:41:14 -05:00
Stéphane Graber
7822022c4c Detect which name to use for docbook2x-man
docbook2x-man doesn't have the same name on Debian based systems as
on RedHat based systems, add some magic to configure.ac to detect and
substitute the proper name in Makefile.am

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 15:38:50 -05:00
Peter Simons
aa8d013ec5 Update documentation to Docbook 4.5
The package 'docbook-tools' [1] required to format Docbook 3.0 into man pages
has been obsoleted a long time ago and can no longer be downloaded from its
former homepage. Recent versions of that package -- now called 'docbook2X' --,
cannot deal with that old markup format anymore (and don't support the '-w all'
command line switch either). To remedy these issues, all SGML files have been
updated to Docbook 4.5 so that recent versions of docbook2man can process them.

[1] http://sources.redhat.com/docbook-tools/
[2] http://docbook2x.sourceforge.net/

Signed-off-by: Peter Simons <simons@cryp.to>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 15:20:39 -05:00
Dwight Engen
434445ee1e Reinstate README file in rootfs directory
Change 5fd8314f removed the README file explaining why the
rootfs directory has to exist. Doing so broke the build on
Fedora 17 since this directory will not be created by make
install and thus the spec file cannot find it.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 13:47:51 -05:00
Stéphane Graber
f282a2f4b8 Revert "Update documentation to Docbook 4.5"
This reverts commit 9a84044bc97098821cce2721ea40a1368f17a091.

The changes made the branch to fail to build on Ubuntu/Debian, so
reverting the commits and re-opening the pull request.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 13:18:32 -05:00
Stéphane Graber
efa99b3226 Revert "Convert remaining file to new docbook format"
This reverts commit 8587ac4b855b7b66931a37742c45cd2c8c624658.

The changes made the branch to fail to build on Ubuntu/Debian, so
reverting the commits and re-opening the pull request.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 13:18:32 -05:00
Stéphane Graber
e03243397d Convert remaining file to new docbook format 2012-11-12 13:18:32 -05:00
Peter Simons
75d0acd48f Update documentation to Docbook 4.5
The package 'docbook-tools' [1] required to format Docbook 3.0 into man pages
has been obsoleted a long time ago and can no longer be downloaded from its
former homepage. Recent versions of that package -- now called 'docbook2X' --,
cannot deal with that old markup format anymore (and don't support the '-w all'
command line switch either). To remedy these issues, all SGML files have been
updated to Docbook 4.5 so that recent versions of docbook2man can process them.

[1] http://sources.redhat.com/docbook-tools/
[2] http://docbook2x.sourceforge.net/

Signed-off-by: Peter Simons <simons@cryp.to>
2012-11-12 13:18:32 -05:00
Dwight Engen
037ba55cbe fix minor spelling error
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
2012-11-12 13:18:32 -05:00
Serge Hallyn
767d4c6743 premount hook is implemented in git
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-12 13:17:54 -05:00
Serge Hallyn
472c97e976 document lxc.hooks in lxc.conf manpage
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-12 13:17:54 -05:00
Stéphane Graber
72d0e1cb2f Merge the liblxc API work by Serge Hallyn.
This turns liblxc into a public library implementing a container structure.
The container structure is meant to cover most LXC commands and can easily be
used to write bindings in other programming languages.

More information on the new functions can be found in src/lxc/lxccontainer.h
Test programs using the API can also be found in src/tests/

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 13:16:16 -05:00
Christian Seiler
7a0b0b5672 lxc-attach: Add -R option to remount /sys and /proc when only partially attaching
When attaching to only some namespaces of the container but not the mount
namespace, the contents of /sys and /proc of the host system do not properly
reflect the context of the container's pid and/or network namespaces, and
possibly others.

The introduced -R option adds the possibility to additionally unshare the
mount namespace (when it is not being attached) and remount /sys and /proc
in order for those filesystems to properly reflect the container's context
even when only attaching to some of the namespaces.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
2012-11-12 13:16:16 -05:00
Christian Seiler
e13eeea2db lxc-attach: Add -s option to select namespaces to attach to
This patch allows the user to select any list of namespaces (network, pid,
mount, uts, ipc, user) that lxc-attach should use when attaching to the
container; all other namespaces will not be attached to.

This allows the user to for example attach to just the network namespace and
use the host's (and not the container's) network tools to reconfigure the
network of the container.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
2012-11-12 13:15:17 -05:00
Serge Hallyn
1881820ae4 lxc-create: Make location of container rootfs configurable
Make 'dir' an explicit backing store type, which accepts '--dir rootfs'
as an option to specify a custom location for the container rootfs.  Also
update lxc-destroy to now remove the rootfs separately, as removing
@LXCPATH@/$name may not hit it.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-12 13:13:52 -05:00
Jan Kiszka
74a2b5864f Add network-down script
Analogously to lxc.network.script.up, add the ability to register a down
script. It is called before the guest network is finally destroyed,
allowing to clean up resources that are not reset/destroyed
automatically. Parameters of the down script are identical to the up
script except for the execution context "down".

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-12 12:04:30 -05:00
Jan Kiszka
b486346aa2 lxc-wait: Add timeout option
Allow to specify a timeout for waiting on state changes via lxc-wait.
Helpful for scripts that need to handle errors or excessive delays in
state changing procedures.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2012-11-12 12:03:23 -05:00
Dwight Engen
c12e775237 Allow short -h and -n options to lxc-ps
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
2012-10-25 10:35:53 +02:00
Dwight Engen
b4578c5b38 lxc-doc-synopsis-args
I was getting raw nroff ".SH DESCRIPTION" in my man pages. This fixes
the synopsis cmd args so that doesn't happen. Added replaceable to a few
arguments.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
2012-10-25 10:32:37 +02:00
Serge Hallyn
72be4f89b0 Add lxc-shutdown script
It optionally waits (an optional timeout # of seconds) for the container to
be STOPPED.  If given -r, it reboots the container (and exits immediately).
I decided to add the timeout after all because it's harder to finagle into
an upstart post-stop script than a full bash script.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-07-31 16:04:33 +02:00
Daniel Baumann
5548f2182e Change ipv4 addresses in the configuration examples
Use non-routed, private IPv4 address in documentation examples
(Closes: #571525).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-07-31 16:01:22 +02:00
David Ward
7ef0141356 refresh lxc-ls
Add an '--active' option that lists active containers by searching
cgroups. (Otherwise, the directories in /var/lib/lxc are listed.)
Modify the cgroup search to only use hierarchies that contain one
or more subsystems. When searching, if a hierarchy contains the
'ns' subsystem, do not append '/lxc' to the parent cgroup.

Add a '--help' option that prints the command syntax.

Print error messages and help information to stderr.

Update the documentation.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-05-04 00:50:15 +02:00
David Ward
f10e7166ab lxc-cgroup: use correct terminology
lxc-cgroup gets or sets the value of a state object (such as
'cpuset.cpus'), not the value of a subsystem (which would be
just 'cpuset').

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-05-04 00:50:15 +02:00
Serge Hallyn
1305dd24af Update manpages to reflect some updated options.
(which reminds me a lxc-clone manpage still needs to be written)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-03-19 00:31:40 +01:00
Daniel Lezcano
baf977694a fix lxc-attach.sgml.in spurious variable list
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2012-03-02 00:02:42 +01:00
Christian Seiler
49ee6cdcbf Add man page for lxc-attach
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-02-23 09:57:14 +01:00
Greg Kurz
d73ef6ec75 lxc: add Bugs section to lxc-monitor(1)
This lxc-monitor limitation deserves some lines in the manpage, until
something is done to allow several monitors to run concurrently.

Signed-off-by: Greg Kurz <gkurz@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-01-05 23:34:46 +01:00
Matthijs Kooijman
be58c6b5b4 .gateway options
Man for the gateway option.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-08-30 23:50:23 +02:00
Daniel Lezcano
c797dcc3d0 lxc-ps : update the man page for passing the options
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-08-11 17:54:57 +02:00
Daniel Lezcano
dff21ef019 explicitly do not use the console
If the keyword 'none' is specified for the console name, lxc will ignore creating a console.
That allows to have a rootfs but without a console.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-08-09 16:51:01 +02:00
Serge Hallyn
e2b4064f94 consolidate ubuntu templates
Consolidate lucid, maverick, natty, and oneiric templates into one 'ubuntu'
template.

Add support for specifying architecture.

Add support for '--trim|-x' option, which removes services like the lucid
template used to.  This creates smaller, faster-booting containers, but they
will not be safe with certain upgrades, like mountall or udev.  When -x is
not specified for lucid or maverick container, then install lxcguest from
the ubuntu-virt ppa, since it does not exist in the official archives, and
the container is not safe to boot without lxcguest.

Add support for '--bindhome <user>' option, which will cause /home/<user>
to be bind-mounted into the container, and create the user with his
original password, shell, and group memberships in the container.

changelog:
  june 23:
    lxc-ubuntu template: set lxc.arch in config
    install lxcguest when NOT trimming the container
    lxc-ubuntu: always install lxcguest in postprocess

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-06-25 15:17:47 +02:00
Cedric Le Goater
dfafa5a513 lxc-execute: document the '--' option
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-05-05 12:07:51 +02:00
Rob Landley
a3e80ccc74 fix lxc-checkpoint and lxc-restart sgml labels
The patch fixes two build breaks in the sgml files:

lxc-checkpoint.sgml.in
Element Title in namespace '' encountered in refsect1, but no template
matches.

lxc-restart.sgml:58: parser error : AttValue: " or ' expected
      <arg
choice=req><option>--name=<replaceable>NAME</replaceable></option></a


Signed-off-by: Rob Landley <rlandley@parallels.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-02-17 10:07:44 +01:00
Daniel Lezcano
955f4ce683 update configuration wrt to the broadcast address
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-02-06 21:30:18 +01:00
Daniel Lezcano
829dd9183c lxc-start can output the console to a file
Add the ability to specify a file to output the console.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-02-01 14:49:40 +01:00
Serge Hallyn
27b39fd49d Update ubuntu templates
Rename 'ubuntu' template to 'lucid'

Add new maverick and natty templates, which do much less tweaking
of the environment.  These should only be used on a kernel which
supports sysfs tagging for /sys/class/net, as udev will be running
in the container.

The natty template needed to slightly change the installed packages
for dhclient to be correclty installed.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-22 21:59:40 +01:00
Daniel Lezcano
6ecad93f96 update the man page with the net script hook
Update the man page wrt the hook script added for the host side
network configuration.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2010-10-26 18:14:47 +02:00
Daniel Lezcano
49d3e78dce update the lxc.conf man page
Update the man page regarding the image or block device
supported as a rootfs.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-10-05 10:28:31 +02:00
Daniel Lezcano
cccc74b514 configure container architecture
When a container is installed with 32bits binaries while we are
running on a 64bits host, inside the container we are seen as
64bits arch. That leads to some problems for the package updates
because the scripts will download 64bits packages instead of 32bits.

This patch defines a configuration variable to set the architecture
of the container.

lxc.arch = i686 | x86 | x86_64 | amd64

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-09-13 15:36:20 +02:00
Daniel Lezcano
765a4e0783 add lxc.console documentation
Add missing documenation about the console output.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-17 14:04:15 +02:00
Ferenc Wagner
4d67c1301b correct template directory documentation
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-16 09:19:15 +02:00
Ferenc Wagner
3103609ddc change pivotdir default to mnt
The mnt directory has a good chance to already exist in the new root
filesystem, so creation and removal can be avoided.  This also eases
use of read only root filesystems (no configuration necessary).

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-11 15:56:25 +02:00
Ferenc Wagner
64b90b3d1e document rootfs options
Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-11 15:56:25 +02:00
Michel Normand
7115cb787d update man pages about logpriority
Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-31 11:56:47 +02:00
Michel Normand
a040ec723e remove remaining .cvsignore files
Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-31 11:56:47 +02:00
Daniel Lezcano
11eaec4c33 fix lxc-execute man page
On buggy docbook-utils, old syntax leads to a bad formatting.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-28 17:39:11 +02:00
Daniel Lezcano
9887d6c6c2 update checkpoint / restart man page
Notify the checkpoint / restart commands do nothing for the moment.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-28 17:01:45 +02:00
Daniel Lezcano
396639d424 update lxc-checkpoint / lxc-restart man
Add documentation for checkpoint / restart CLI.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-28 17:01:45 +02:00
Daniel Lezcano
baf6671fd3 change the rootfs mount location and add the README
Previous path was $libdir/lxc, changed to $libdir/lxc/rootfs.
Added a README file to be placed in this directory, describing
the purpose of this empty directory. Having a file to be installed
in this directory makes the Makefile to automatically create the
directory at install time.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-27 14:27:13 +02:00
Michel Normand
b8da590f0e lxc-kill man update about SIGSTOP and SIGKILL
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-05-27 14:26:09 +02:00
gkurz@linux.vnet.ibm.com
e4b3fe5833 lxc: introduce lxc-kill command (v4)
lxc-kill send a signal to the process 1 of the container.

If this command is used on an application container ran by
lxc-execute, the lxc-init will receive the signal and will forward it to
the process 2 which is the command specified in the command line.

Signed-off-by: Greg Kurz <gkurz@fr.ibm.com>
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-04-29 10:03:59 +02:00
Michel Normand
b78b21258c man update lxc.conf
reformating given examples
and add reference to examples directory.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-04-29 10:03:59 +02:00
Michel Normand
becc0400fc man update lxc-create lxc-destroy
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-04-29 10:03:59 +02:00
Michel Normand
94b81f611f man update lxc-execute and lxc-start (V2)
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-04-29 10:03:59 +02:00
Michel Normand
a941cc0bf6 man update lxc
update lxc man page to better explain:
* the notions of persistent and volatil container.
* the difference between lxc-execute and lxc-start commands

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-04-29 10:03:59 +02:00
Daniel Lezcano
9eb09f8721 version 0.6.5
Increment to 0.6.5 version.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-22 11:45:11 +01:00
Daniel Lezcano
81810dd120 drop capabilities
Hello everyone!

I've written a patch which adds a new config keyword
'lxc.cap.drop'. This keyword allows to specify capabilities which are
dropped before executing the container binary.

Example:

lxc.cap.drop = sys_chroot
lxc.cap.drop = mknod
lxc.cap.drop = sys_module

or specify in a single line:

lxc.cap.drop = sys_chroot mknod sys_module

Reworked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Michael Holzt <lxc@my.fqdn.org>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-21 15:06:42 +01:00
Cedric Le Goater
33ba4ad795 lxc: add --define to start
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-14 07:43:18 +01:00
Cedric Le Goater
201172806c add --define to execute
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-14 07:43:18 +01:00
Daniel Lezcano
f079d569fc fix bad docbook syntax in lxc-create.sgml.in
Removed extra </command>.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-08 15:19:20 +01:00
Michael Holzt
c553a9c22e Rename doc/examples/lxc-complex-config.in to lxc-complex.conf.in
Rename doc/examples/lxc-complex-config.in to lxc-complex.conf.in as all other
examples in this directory have a .conf ending as well.

Signed-off-by: Michael Holzt <lxc@my.fqdn.org>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-08 15:19:20 +01:00
Michel Normand
0bb4f8cf3b lxc: update man and help of lxc-create
few added lines to document the new lxc-create -t option

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-08 14:34:13 +01:00
Paul Fee
23a92fad75 fix manpage typo
Fix and clarify some parts of the lxc.conf man page.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-01-05 13:11:27 +01:00
Daniel Lezcano
e892973e39 add macvlan vepa and bridge mode
The future kernel 2.6.33 will incorporate the macvlan bridge
mode where all the macvlan will be able to communicate if they are
using the same physical interface. This is an interesting feature
to have containers to communicate together. If we are outside of the
container, we have to setup a macvlan on the same physical interface than
the containers and use it to communicate with them.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-12-28 22:10:11 +01:00
Jamal Hadi Salim
26c390288b Add VLAN support in config
This adds ability to migrate vlan interfaces into namespaces
by specifying them in a config
    
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-12-15 10:14:27 +01:00
Michel Normand
83c2e17524 lxc-ps typo in man lxc
Fix bad name parameter in the lxc-ps man page.

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-24 09:47:27 +01:00
Daniel Lezcano
6a22713f64 update the man pages
Update the man pages regarding the different modifications.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-20 15:01:30 +01:00
Daniel Lezcano
0f71d073ee update the man pages
Update the man pages regarding the modifications around the 
configuration option, volatile containers and new configuration
file format.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-19 15:06:02 +01:00
Andrian Nord
3fb0a9bb6e Q: general lxc architecture
Patch moves etc/* contents into doc/examples/ and adds
--disable-examples configure switch which may be used not to install
examples. Default is to install them into ${docdir}/examples (commonly:
/usr/share/doc/lxc/examples)

Signed-off-by: Andrian Nord <NightNord@gmail.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-13 11:48:29 +01:00
Michel Normand
d5cf438682 lxc: lxc version to reflect string in AC_INIT (V2)
I changed the code to have lxc version to reflect the
string set in AC_INIT of configure.ac
rather than to report only the 3 first digits

update: use PACKAGE_VERSION in place of VERSION

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-11-04 15:14:30 +01:00
Guido Trotter
5c320b7692 Distribute manpages in source tarball
Ship the manpages in the source tarball made by 'make dist', and clean
them up only during the 'make maintainer-clean' step. This allows
distributions not to depend on docbook at lxc build time, because the
manpages are already there.

Also update the configure warning message to sound less scary.

Signed-off-by: Guido Trotter <ultrotter@quaqua.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-26 17:44:11 +02:00
Daniel Lezcano
c159cb9638 fix the document according the current version
Remove the comment about sharing /dev and fix the lxc-ps option
format.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-24 16:41:27 +02:00
Daniel Lezcano
0d9f8e188c detect a cgroup named 'lxc'
This patch makes lxc to detect a specific cgroup dedicated to lxc
which is mounted with the lxc name. That allows to mount different
cgroup in different places with different options (aka subsystems)
and assign one to be used by lxc. If no such mount point is found,
the first cgroup mount point is used.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-13 23:12:10 +02:00
Filippo Giunchedi
ac30d6a432 Add file capabilities to kernel options
Point users in documentation to also enable POSIX capability for
dropping CAP_BOOT.

Signed-off-by: Filippo Giunchedi <filippo@esaurito.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-02 15:42:18 +02:00
Filippo Giunchedi
0478642a43 Update kernel config options location
These options appear in 2.6.29 in different locations, update the sgml
accordingly

Signed-off-by: Filippo Giunchedi <filippo@esaurito.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-02 15:42:18 +02:00
christophe.quintard@fr.ibm.com
9f78081ae0 Rewriting the pts section man for lxc.conf
I think this explanation is better.

Signed-off-by: Christophe Quintard <christophe.quintard@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-02 15:42:17 +02:00
Michel Normand
8f0024d85a update the lxc-ps man page after previous code change
this is the man page update following the
previous git commit 7cbfc4e441

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-07-01 11:58:41 +02:00
Daniel Lezcano
3b9246c4aa don't remove the autoconf generated files
Don't clean up the sgml which are generated by configure, otherwise
at the next make, the documentation generation will complain about
missing files.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-06-07 21:48:46 +02:00
Daniel Lezcano
c36583c303 Make possible to daemonize lxc-start
If needed the container can be launched in background
with a specific option -d.

That will make mute the container, the logs can help
to check what went wrong.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-06-07 21:48:46 +02:00
Daniel Lezcano
1490112767 Add missing file to the repository
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-05-29 14:43:39 +02:00
Michel Normand
10fba81b9d change man pages to use a common file for common options
the common options of lxc commands
are now described in one file "common_options.sgml.in"

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-05-28 15:32:30 +02:00
Michel Normand
99e4008cad change man pages to use a seealso file for references
the common references to lxc man pages
are now placed in one file "see_also.sgml.in"

Note that the few man pages that refer to man
pages that are not lxc ones have two "See Also" paragraph.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-05-28 15:32:29 +02:00
Daniel Lezcano
be43f17e58 autoassign tty number
When no tty number is specified in the command line,
let the tty service to provide choose one available
tty and provide this one.

The documentation is updated wrt this modification and
I did a little fix to generate the date of the documentation.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-05-07 19:36:33 +02:00
dlezcano
341a091c39 Update the man according new devpts instance
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Update the man page with the new devpts instance option.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-02-12 14:48:25 +00:00
dlezcano
b0a33c1eb6 From: Daniel Lezcano <daniel.lezcano@free.fr>
Console support for the system container.

Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2009-01-25 21:52:38 +00:00
dlezcano
46105d2d1d Removed pointless file
From: Michel Normand <michel.mno@free.fr>

I do not understand the purpose of this file in the doc/ subdir
seems to be useless.

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-14 20:26:47 +00:00
dlezcano
892bd61e0f Add Frequently Asked Question to dist tarball
From: Michel Normand <michel.mno@free.fr>

Add FAQ to the dist tarball.

Signed-off-by: Michel Normand <michel.mno@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-14 20:24:33 +00:00
dlezcano
a340b3fc00 Add more to cvsignore
From: Michel Normand <michel_mno@laposte.net>

Add more files to .cvsignore, especially the new created files.

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-13 12:32:11 +00:00
dlezcano
1099808017 Describe Ubuntu 8.10 vs libtool problem
From: Michel Normand <michel_mno@laposte.net>

Add an entry in the FAQ about libtool problem on Ubuntu 8.10

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2008-12-13 12:19:29 +00:00
dlezcano
053567ec77 A faq file.
From: Michel Normand <michel_mno@laposte.net>

The FAQ file to be filled.

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-08 17:21:21 +00:00
dlezcano
b6d441f289 Fix some typos
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fix some typos.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-12-01 11:05:07 +00:00
dlezcano
998dc19ad6 Fix some typos
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Fixed some typos in the man pages

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-11-25 12:49:14 +00:00
dlezcano
f1d8791c17 Added missing lxc.7 man page
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the file lxc.sgml.in to the repository.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-11-24 10:36:18 +00:00
dlezcano
8b8b04f80a Add lxc.7 man page
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the overview man page for lxc.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-11-20 15:04:09 +00:00
dlezcano
8a67a2b2ea Added the man page lxc.conf.5
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Added the man page for the lxc.conf configuration file.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2008-11-19 16:58:09 +00:00