LXC non working for me

dear coleagues

like a newbie i wanna to try create a LXC container, but in luci i have some issues with.
i cannot see any template
the only i see for FEW SECONDS is “just want to…”,
creation by SSH returns me an error.
all lxc software already reinstalled

can you please help me?

TIA

Omnia is being racist, it doesn’t like maniac’s.

Just kidding…

Could you give me the output of this…

ls -l /usr/share/lxc/templates

Also the output of this…

cat /usr/share/lxc/lxc.functions

in my case : many templates ready …

and functions…:

globalconf=/etc/lxc/lxc.conf
bindir=/usr/bin
templatedir=/usr/share/lxc/templates
lxcinitdir=/usr/lib

lxc_path=lxc-config lxc.lxcpath
lxc_vg=lxc-config lxc.bdev.lvm.vg
lxc_zfsroot=lxc-config lxc.bdev.zfs.root

Manual lxc-create using debian template , ends with error on some essential parts (not important). (still some pkg is missing) … i hate that updater.sh vs updater-ng.sh vs user.lua vs opkg vs luci … yeah why to make something so semi-complicated :smiley:

[update] in the end i have to opkg install --force-reinstall lxc, lua-lxc-app , one post-install script was having issues with existing lxc.path folder. So i let him done what he needs, restore my configs/setup and voila two linuxes are now running.

Could you delete lxc-templates package and then back again reinstall lxc-templates package?

i assume yes, but won’t try (i am in middle of playing with lxc right now)… i will surely mess with it somehow, so soon or later i will be forced to reinstall it again/reset it, i let you know, how it went.

1 Like

If you need any help, there is a irc channel i just recently found.

freenode

#lxcontainers

Hi Big Boss, here are the outputs:

root@turris:~# ls -l /usr/share/lxc/templates
-rwxr-xr-x 1 root root 10496 Dec 5 18:46 lxc-alpine
-rwxr-xr-x 1 root root 13495 Dec 5 18:46 lxc-altlinux
-rwxr-xr-x 1 root root 11089 Dec 5 18:46 lxc-archlinux
-rwxr-xr-x 1 root root 9632 Dec 5 18:46 lxc-busybox
-rwxr-xr-x 1 root root 29058 Dec 5 18:46 lxc-centos
-rwxr-xr-x 1 root root 10408 Dec 5 18:46 lxc-cirros
-rwxr-xr-x 1 root root 18020 Dec 5 18:46 lxc-debian
-rwxr-xr-x 1 root root 17586 Dec 5 18:46 lxc-download
-rwxr-xr-x 1 root root 49252 Dec 5 18:46 lxc-fedora
-rwxr-xr-x 1 root root 28253 Dec 5 18:46 lxc-gentoo
-rwxr-xr-x 1 root root 13790 Dec 5 18:46 lxc-openmandriva
-rwxr-xr-x 1 root root 14916 Dec 5 18:46 lxc-opensuse
-rwxr-xr-x 1 root root 40245 Dec 5 18:46 lxc-oracle
-rwxr-xr-x 1 root root 11173 Dec 5 18:46 lxc-plamo
-rwxr-xr-x 1 root root 6792 Dec 5 18:46 lxc-sshd
-rwxr-xr-x 1 root root 24639 Dec 5 18:46 lxc-ubuntu
-rwxr-xr-x 1 root root 11259 Dec 5 18:46 lxc-ubuntu-cloud
root@turris:~# cat /usr/share/lxc/lxc.functions

globalconf=/etc/lxc/lxc.conf
bindir=/usr/bin
templatedir=/usr/share/lxc/templates
lxcinitdir=/usr/lib

lxc_path=lxc-config lxc.lxcpath
lxc_vg=lxc-config lxc.bdev.lvm.vg
lxc_zfsroot=lxc-config lxc.bdev.zfs.root
root@turris:~#

Because your lxc-templates already are not doing what they should do. Could you reinstall all the lxc packages.

hi
all reinstallet without success

turris reflashed from USB to factory, no success

always the same…

Long-shot: but do you have any custom mounts (could be a funny mount that got in the way)?

do you mean this?

Cheers B_b,

finally i have to remove some packages. So i tried to remove lxc-templates. (no harm to already running lxc guest machines). While not having templates, LuCi shown machine statuses correctly. Basic operation start/stop/freeze/unfreeze working as well. The only failing stuff : 1. automatic templates check (expected) , 2. even if templates at place, can’t create any guest machine (when in shell direct ‘download’ from provided lxc-api service is failing = even if correct path-url …).

Manually opkg install --force-reinstall lxc-templates brings all functionality back.

hmmm… yesterday i made all reinstallations, forced reinstallations… all packages… only needed packages… no success… for few minutes i was able to see all templates in luci, but creating a vm was unsuccessfull… i am really disappointed… maybe new update makes me happy.
I am very surprised, why i am not able to create the container nor after total clear factory reset from usb

Update 3.4 is here. Let me know how things have went.

I think LuCi LXC only use the lxc-template “download”. I think your problem is with GPG or with URL of the GPG Keyring.

yes, something like this… GPG… no urls changed, only one successfull try and then nothing again…

and what’s new after the update? … just works :grinning:

Very nice!!..GREAT SUCCESS!!

Does anyone know the default Login for Ubuntu LXC created by LuCI?

http://router/cgi-bin/luci/admin/services/lxc

When I try to login using:

lxc-console -n Ubuntu

What is the username and password?

Use lxc-attach -n ubuntu and you’ll be logged in as root and can set the password using passwd

1 Like