[Lxc-users] Difficulties setting up lxc on Debian 7

Rory Campbell-Lange rory at campbell-lange.net
Fri May 24 10:26:07 UTC 2013


I'd be grateful for assistance trying to get a minimal Debian 7 lxc system
running on a Debian 7 host.

I've been mainly following this guide: http://www.stefan-seelmann.de/wiki/lxc 

I've installed live-debconfig into the base system and
/usr/share/lxc/packages/.

I have a minimal cfg file along the following lines:

    lxc.utsname            = code
    lxc.network.type       = veth
    lxc.network.flags      = up
    lxc.network.link       = br0
    lxc.network.name       = eth1
    lxc.network.ipv4       = 192.168.7.2/27
    lxc.network.veth.pair  = veth0 

Try one:

    lxc-create -n code2 -t debian -f config.cfg -B btrfs
    (/var/lib/lxc is a symlink to /vms, a btrfs volume)

This has lots of errors such as:

    Copying local cache to /var/lib/lxc/code2/rootfs...
    /usr/share/lxc/templates/lxc-debian: line 101: /var/lib/lxc/code2/rootfs/etc/apt/sources.list.d/debian.list: No such file or directory
    /usr/share/lxc/templates/lxc-debian: line 107: /var/lib/lxc/code2/rootfs/etc/apt/sources.list.d/debian.list: No such file or directory
    /usr/share/lxc/templates/lxc-debian: line 111: /var/lib/lxc/code2/rootfs/etc/apt/sources.list.d/debian.list: No such file or directory
    /usr/share/lxc/templates/lxc-debian: line 183: /var/lib/lxc/code2/rootfs/etc/fstab: No such file or directory
    mount: mount point /var/lib/lxc/code2/rootfs/dev/pts does not exist
    mount: mount point /var/lib/lxc/code2/rootfs/proc does not exist
    mount: mount point /var/lib/lxc/code2/rootfs/sys does not exist
    mount: mount point /var/lib/lxc/code2/rootfs/var/cache/apt/archives does not exist

Try two:

    get rid of btrfs volume/symlink

    lxc-create -n code3 -t debian -f config.cfg

    Errors:
    debconf: unable to initialize frontend:...
    update-rc.d: warning:  start runlevel arguments (none) do not match live Default-Start values (S)
    /usr/bin/env: live-debconfig: No such file or directory

When trying to start code3 there are lots of mount problems:

    Creating compatibility symlink from /etc/mtab to /proc/mounts. ...
    (warning).
    Cleaning up temporary files... /tmp.
    mount: permission denied
    mount: permission denied
    mount: permission denied
    ...

and I never get to a boot screen.


-- 
Rory Campbell-Lange
rory at campbell-lange.net




More information about the lxc-users mailing list