lxc-attach and lxc-ls does not see containers created by DAB

qRoC

Member
Aug 11, 2016
3
0
21
32
I try create LXC template:
$ make

But I get an error that the container can not be found.

Manual start:
$ lxc-start -n test -f /var/lib/vz/template/builds/debian-8.5-minimal-64/config
$ lxc-info -n test

Name: test
State: RUNNING
PID: 1658
CPU use: 0.26 seconds
Memory use: 9.19 MiB
KMem use: 0 bytes​

$ lxc-attach -n test --clear-env -- defenv /sbin/ldconfig
Error: container test is not defined​
$ lxc-ls -f


Porxmox 4.2
Debian 8.5
 
Last edited:
Yes this is due to a change in LXC after which it required an existing configuration (which with dab is not in its default search path), a patch to fix this has already been accepted upstream and we'll release the fixes with the next updates.
 
Between the last release and now they've moved some files to a different folder, so you'll have to rebase them. Also a few more changes were necessary after all which I'm currently tracking in a branch to be pushed upstream when ready.
First commit
branch
It also requires changes to DAB itself (to pass along the `-f` option with every command) which aren't pushed to the dab repository yet.
 
Should work with lxc-2.0.4 and dab 2.0-6 from the pvetest repositories.