[lxc-users] Lxc containers on a Raspberry Pi 2

Gunnar Wolf gwolf at gwolf.org
Wed Apr 13 15:09:20 UTC 2016


Muneeb Ahmad dijo [Sat, Apr 09, 2016 at 01:23:40AM +0500]:
> After running that command:
> 
> 
> Setting up the GPG keyring
> 
> Downloading the image index
> 
> ERROR: Couldn't find a matching image.
> 
> lxc-create: lxccontainer.c: create_run_template: 1290 container creation
> template for foo failed
> 
> lxc-create: lxc_create.c: main: 316 Error creating container foo

Try peeling away complicated bits, and start from a command as simple
as possible: Instead of having LXC download/install a prebuilt image,
create your own rootfs with debootstrap. Get a working lxc config
file, and place it in /var/lib/vhosts/mycontainer/config; edit it to
reflect what you want on your new container. Then, create
/var/lib/vhosts/mycontainer/rootfs and run:

    # debootstrap <suite> /var/lib/vhosts/mycontainer/rootfs

That will create you an install of <suite> inside that directory. I
don't run Ubuntu, but Debian — Our valid suits are sid, stretch and
jessie (or by symbolic name: unstable, testing and stable), but I
guess debootstrap will understand Ubuntu release names as well
(trusty, vivid, wily, xenial).

That should get you a working system to start from.


More information about the lxc-users mailing list