Commit Graph

31 Commits

Author SHA1 Message Date
Serge Hallyn
c6992ecf0d lxc-ubuntu: Default to current ubuntu release.
If can't match any valid release, use lucid.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
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
Serge Hallyn
8339b4c86a lxc-ubuntu: Base arch detection code on debootstrap's with some additions when we don't have dpkg or udpkg
Changelog: [seh] Don't take arch from environment

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
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
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
Stéphane Graber
d755a9e6b4 Add initial oneiric template 2011-05-26 22:58:23 +02:00
Stéphane Graber
3930b7453e Convert all Debian (and derivative) templates from using 'arch' to using 'dpkg --print-architecture' as debootstrap does 2011-05-26 22:58:23 +02:00
Daniel Lezcano
f66331efb0 templates: don't put devpts in $confdir/container/fstab
src/lxc/conf.c will explicitly mount it anyway.  Furthermore, the fstab
entry, which is getting processed first, did not specify -o newinstance.
This can cause the host's devpts entry mount options to change, as in
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/607636.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-05-07 01:33:33 +02:00
Serge E. Hallyn
f2b2ec3160 templates: don't put devpts in $confdir/container/fstab
src/lxc/conf.c will explicitly mount it anyway.  Furthermore, the fstab
entry, which is getting processed first, did not specify -o newinstance.
This can cause the host's devpts entry mount options to change, as in
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/607636.

I believe the lenny, fedora, and debian templates also will need an
update.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-05-07 01:33:33 +02:00
Amit Uttamchandani
7593bdfbe2 Fixed a small typo in lxc-debian template
"udpate" should be "update" in configure_debian().

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-02-19 09:45:32 +01:00
Daniel Lezcano
b09ecaf303 Fix paths in the lxc-busybox template
Author of the patch : Jonathan Liu <???> posted as a bug fix on the lxc
sourceforge website.

OS: Arch Linux 32-bit

/etc/init.d/rcS do not use full path to syslogd, mount and udhcpc executables.
As busybox requires /proc mounted if CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
to run these commands without full path, the full path should be used in the
startup script as /proc is mounted later in the script.

It also fails to start the machine if /lib64 does not exist on the host system
as there is a mount entry for /lib64 in the config.

The attached patch changes commands in /etc/init.d/rcS to use full path and
adds a check for /lib64 on host before adding lib64 mount entries to config.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-28 00:24:54 +01:00
Daniel Lezcano
434d90db57 suppress udev log output
We use udev within these containers and we prevent the /dev files
to be created with the cgroup whitelist. So when the udevd receives
the event from the kernel, it will fail to create some nodes in /dev
and will spit error on the console.

We set the log level to zero, so udev will silently fail.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-23 21:47:12 +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
2175f8936c add lxc-lenny template
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-14 09:51:13 +01:00
Daniel Lezcano
03d56dffa6 add missing template in Makefile
Missed to add lxc-lenny to the template.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-13 16:25:14 +01:00
Daniel Lezcano
0016af974d fix busybox inittab template
The inittab file format is wrong regarding how behaves busybox with
this syntax.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2011-01-13 16:25:14 +01:00
Daniel Baumann
57f61aa750 Correcting charset argument when calling locale-gen.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Baumann
346645ef74 Correcting include argument when calling debootstrap.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Baumann
0b2fa08ea6 Disabling unneeded checkroot.sh initscript in debian template.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Baumann
4e0eb76555 Creating missing tty device nodes for squeeze in debian template.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Baumann
49a630b8f3 Setting default mirror to cdn.debian.net in debian template.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Baumann
9116540be4 Setting default suite to squeeze in debian template.
Signed-off-by:  Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:51 +01:00
Daniel Lezcano
54c7901672 Duplicate lxc-debian to lxc-lenny
Duplicate the lxc-debian template to use it as a fine grained
template.

Subject: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-12-28 21:32:50 +01:00
Daniel Lezcano
2a7c16dc03 improve lxc-debian template to specify the suite
The attached patch adds a variable at the top of lxc-debian to change the SUITE.
Currently tested suites are lenny, squeeze, sid.

Also, the patch uses the dhcp3-client package instead of dhcp-client which is
deprecated in lenny and removed in squeeze.

Patch initialy from Mathieu Parent.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-10-01 17:07:03 +02:00
Daniel Lezcano
78bdcd081e remove bad default console option in ubuntu template
Remove this options as by default container console goes to the tty
or /dev/null if not available.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-24 09:47:14 +02:00
Daniel Lezcano
a7dff83460 fix /proc not mounted in debian container
Mount some systemm fs for the container. By default, /proc
is no longer mounted in debian.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-23 00:44:13 +02:00
Daniel Lezcano
70e279574c fix sshd template
Fixed the sshd template example.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-17 22:44:23 +02:00
Panagiotis H.M. Issaris
0830689d86 Forgotten @LIBEXECDIR@ replacement
Forgotten part of commit d674be08d4

Signed-off-by: Panagiotis H.M. Issaris <takis@issaris.org>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-16 09:19:15 +02:00
Daniel Lezcano
b6e91b6717 update the fedora template
Update the fedora template in order to call it from the lxc-create
script.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-07 11:33:55 +02:00
Daniel Lezcano
f1fa1a0866 generate locales on debian
Let's do like the ubuntu template and generate locales automatically.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-07 11:33:55 +02:00
Daniel Lezcano
5bad66ba56 ubunutu - fix ssh runlevel stop condition
The default ssh upstart configuration makes the daemon to respawn
either if we are shutdowning.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-07 11:33:55 +02:00
Wilhelm Meier
bc24fe4d8a few enhancement on the ubuntu template
Improved and cleanup the ubuntu template.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Wilhelm Meier <wilhelm.meier@fh-kl.de>
2010-06-07 11:33:55 +02:00
Daniel Lezcano
c01d62f21b move script templates to an adequate place
At present the lxc-{template} scripts are installed in the $bindir.
This is not the right place as specified by the FHS, so they go to
$libdir/lxc/templates.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2010-06-07 11:33:55 +02:00