blob: 702817905305282ac1295f912a396440df55934b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# LXC
Based on `lxc-archlinux` from https://github.com/lxc/lxc-templates (version 3.0.4).
Tested with 'lxc' on Archlinux (version 5.0.1).
# Usage
Install the 'lxc' package and 'lxc-templates' (from the AUR).
Copy `lxc-archlinux32` to `/usr/share/lxc/templates`.
Create an LXC image with:
`lxc-create -n arch32 -t /usr/share/lxc/templates/lxc-archlinux32 -- -a pentium4`
(choose one of `pentium4`, `i686` or `i486`)
Things are adaped automatically in the LXC config file (`/var/lib/lxc/arch32/config`),
for instance:
```
lxc.arch = i686
```
If you want to use X in the container the following snippet might help:
```
lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir
lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir,ro
lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file
```
Mounting your hosts home for instance is quite handy:
```
lxc.mount.entry=/home home none bind 0 0
```
# Bugs
- mirrorlist in container gets hard-coded architecture `pentium4` instead of `$arch`
- arch is set to pentium4 in lxc config (which is something not known to LXC)
|