Lxc-create doesn't work anymore after OS upgrade


(Blaise) #1

Hello,

I upgraded from Debian 8 to Debian 9, I thought everything went well, but it didn’t.

The old containers work, but when I create new ones it doesn’t work anymore.

I wanted to update LXC, but it would certainly be safe to fix the current version first.

root@toucan:/usr/share/lxc/templates# lxc-create -n test -t debian-clean
debootstrap is /usr/sbin/debootstrap
Checking cache download in @LOCALSTATEDIR@/cache/lxc/debian/rootfs-stretch-amd64 ...
Downloading debian minimal ...
I: Retrieving InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 067E3C456BAE240ACEE88F6FEF0F382A1A7B6500)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: libaudit-common libaudit1 libbz2-1.0 libcap-ng0 libdb5.3 libdebconfclient
0 libgcrypt20 libgpg-error0 liblz4-1 libncursesw5 libsemanage-common libsemanage1 libsystemd0 libudev1 libustr-1.0-1

I: Found additional base dependencies: adduser debian-archive-keyring dmsetup gpgv iproute2 libapparmor1 libapt-pkg5
.0 libbsd0 libc-l10n libcap2 libcryptsetup4 libdevmapper1.02.1 libdns-export162 libedit2 libelf1 libgssapi-krb5-2 li
bidn11 libip4tc0 libisc-export160 libk5crypto3 libkeyutils1 libkmod2 libkrb5-3 libkrb5support0 libmnl0 libncurses5 l
ibprocps6 libseccomp2 libssl1.0.2 libstdc++6 libwrap0 openssh-client openssh-sftp-server procps systemd systemd-sysv
 ucf
I: Checking component main on http://httpredir.debian.org/debian...
I: Retrieving libacl1 2.2.52-3+b1
I: Validating libacl1 2.2.52-3+b1
I: Retrieving adduser 3.115
I: Validating adduser 3.115
I: Retrieving libapparmor1 2.11.0-3+deb9u2
I: Validating libapparmor1 2.11.0-3+deb9u2
I: Retrieving apt 1.4.9
I: Validating apt 1.4.9
I: Retrieving libapt-pkg5.0 1.4.9
I: Validating libapt-pkg5.0 1.4.9
I: Retrieving libattr1 1:2.4.47-2+b2
I: Validating libattr1 1:2.4.47-2+b2
I: Retrieving libaudit-common 1:2.6.7-2
I: Validating libaudit-common 1:2.6.7-2
I: Retrieving libaudit1 1:2.6.7-2
I: Validating libaudit1 1:2.6.7-2
I: Retrieving base-files 9.9+deb9u9
I: Validating base-files 9.9+deb9u9
I: Retrieving base-passwd 3.5.43
I: Validating base-passwd 3.5.43
I: Retrieving bash 4.4-5
I: Validating bash 4.4-5
I: Retrieving libdns-export162 1:9.10.3.dfsg.P4-12.3+deb9u4
I: Validating libdns-export162 1:9.10.3.dfsg.P4-12.3+deb9u4
I: Retrieving libisc-export160 1:9.10.3.dfsg.P4-12.3+deb9u4
I: Validating libisc-export160 1:9.10.3.dfsg.P4-12.3+deb9u4
I: Retrieving libbz2-1.0 1.0.6-8.1
I: Validating libbz2-1.0 1.0.6-8.1
I: Retrieving libdebconfclient0 0.227
I: Validating libdebconfclient0 0.227
I: Retrieving coreutils 8.26-3
I: Validating coreutils 8.26-3
I: Retrieving libcryptsetup4 2:1.7.3-4
I: Validating libcryptsetup4 2:1.7.3-4
I: Retrieving dash 0.5.8-2.4
I: Validating dash 0.5.8-2.4
I: Retrieving libdb5.3 5.3.28-12+deb9u1
I: Validating libdb5.3 5.3.28-12+deb9u1
I: Retrieving debconf 1.5.61
I: Validating debconf 1.5.61
I: Retrieving debian-archive-keyring 2017.5
I: Validating debian-archive-keyring 2017.5
I: Retrieving debianutils 4.8.1.1
I: Validating debianutils 4.8.1.1
I: Retrieving dialog 1.3-20160828-2
I: Validating dialog 1.3-20160828-2
I: Retrieving diffutils 1:3.5-3
I: Validating diffutils 1:3.5-3
I: Retrieving dpkg 1.18.25
I: Validating dpkg 1.18.25
I: Retrieving e2fslibs 1.43.4-2
I: Validating e2fslibs 1.43.4-2
I: Retrieving e2fsprogs 1.43.4-2
I: Validating e2fsprogs 1.43.4-2
I: Retrieving libcomerr2 1.43.4-2
I: Validating libcomerr2 1.43.4-2
I: Retrieving libss2 1.43.4-2
I: Validating libss2 1.43.4-2
I: Retrieving libelf1 0.168-1
I: Validating libelf1 0.168-1
I: Retrieving findutils 4.6.0+git+20161106-2
I: Validating findutils 4.6.0+git+20161106-2
I: Retrieving gcc-6-base 6.3.0-18+deb9u1
I: Validating gcc-6-base 6.3.0-18+deb9u1
I: Retrieving libgcc1 1:6.3.0-18+deb9u1
I: Validating libgcc1 1:6.3.0-18+deb9u1
I: Retrieving libstdc++6 6.3.0-18+deb9u1
I: Validating libstdc++6 6.3.0-18+deb9u1
I: Retrieving libc-bin 2.24-11+deb9u4
I: Validating libc-bin 2.24-11+deb9u4
I: Retrieving libc-l10n 2.24-11+deb9u4
I: Validating libc-l10n 2.24-11+deb9u4
I: Retrieving libc6 2.24-11+deb9u4
I: Validating libc6 2.24-11+deb9u4
I: Retrieving locales 2.24-11+deb9u4
I: Validating locales 2.24-11+deb9u4
I: Retrieving multiarch-support 2.24-11+deb9u4
I: Validating multiarch-support 2.24-11+deb9u4
I: Retrieving gpgv 2.1.18-8~deb9u4
I: Validating gpgv 2.1.18-8~deb9u4
I: Retrieving grep 2.27-2
I: Validating grep 2.27-2
I: Retrieving gzip 1.6-5+b1
I: Validating gzip 1.6-5+b1
I: Retrieving hostname 3.18+b1
I: Validating hostname 3.18+b1
I: Retrieving ifupdown 0.8.19
I: Validating ifupdown 0.8.19
I: Retrieving init 1.48
I: Validating init 1.48
I: Retrieving init-system-helpers 1.48
I: Validating init-system-helpers 1.48
I: Retrieving iproute 1:4.9.0-1+deb9u1
I: Validating iproute 1:4.9.0-1+deb9u1
I: Retrieving iproute2 4.9.0-1+deb9u1
I: Validating iproute2 4.9.0-1+deb9u1
I: Retrieving libip4tc0 1.6.0+snapshot20161117-6
I: Validating libip4tc0 1.6.0+snapshot20161117-6
I: Retrieving isc-dhcp-client 4.3.5-3+deb9u1
I: Validating isc-dhcp-client 4.3.5-3+deb9u1
I: Retrieving libkeyutils1 1.5.9-9
I: Validating libkeyutils1 1.5.9-9
I: Retrieving libkmod2 23-2
I: Validating libkmod2 23-2
I: Retrieving libgssapi-krb5-2 1.15-1+deb9u1
I: Validating libgssapi-krb5-2 1.15-1+deb9u1
I: Retrieving libk5crypto3 1.15-1+deb9u1
I: Validating libk5crypto3 1.15-1+deb9u1
I: Retrieving libkrb5-3 1.15-1+deb9u1
I: Validating libkrb5-3 1.15-1+deb9u1
I: Retrieving libkrb5support0 1.15-1+deb9u1
I: Validating libkrb5support0 1.15-1+deb9u1
I: Retrieving libbsd0 0.8.3-1
I: Validating libbsd0 0.8.3-1
I: Retrieving libcap-ng0 0.7.7-3+b1
I: Validating libcap-ng0 0.7.7-3+b1
I: Retrieving libcap2 1:2.25-1
I: Validating libcap2 1:2.25-1
I: Retrieving libedit2 3.1-20160903-3
I: Validating libedit2 3.1-20160903-3
I: Retrieving libgcrypt20 1.7.6-2+deb9u3
I: Validating libgcrypt20 1.7.6-2+deb9u3
I: Retrieving libgpg-error0 1.26-2
I: Validating libgpg-error0 1.26-2
I: Retrieving libidn11 1.33-1
I: Validating libidn11 1.33-1
I: Retrieving libmnl0 1.0.4-2
I: Validating libmnl0 1.0.4-2
I: Retrieving libseccomp2 2.3.1-2.1+deb9u1
I: Validating libseccomp2 2.3.1-2.1+deb9u1
I: Retrieving libselinux1 2.6-3+b3
I: Validating libselinux1 2.6-3+b3
I: Retrieving libsemanage-common 2.6-2
I: Validating libsemanage-common 2.6-2
I: Retrieving libsemanage1 2.6-2
I: Validating libsemanage1 2.6-2
I: Retrieving libsepol1 2.6-2
I: Validating libsepol1 2.6-2
I: Retrieving lsb-base 9.20161125
I: Validating lsb-base 9.20161125
I: Retrieving dmsetup 2:1.02.137-2
I: Validating dmsetup 2:1.02.137-2
I: Retrieving libdevmapper1.02.1 2:1.02.137-2
I: Validating libdevmapper1.02.1 2:1.02.137-2
I: Retrieving liblz4-1 0.0~r131-2+b1
I: Validating liblz4-1 0.0~r131-2+b1
I: Retrieving mawk 1.3.3-17+b3
I: Validating mawk 1.3.3-17+b3
I: Retrieving libncurses5 6.0+20161126-1+deb9u2
I: Validating libncurses5 6.0+20161126-1+deb9u2
I: Retrieving libncursesw5 6.0+20161126-1+deb9u2
I: Validating libncursesw5 6.0+20161126-1+deb9u2
I: Retrieving libtinfo5 6.0+20161126-1+deb9u2
I: Validating libtinfo5 6.0+20161126-1+deb9u2
I: Retrieving ncurses-base 6.0+20161126-1+deb9u2
I: Validating ncurses-base 6.0+20161126-1+deb9u2
I: Retrieving ncurses-bin 6.0+20161126-1+deb9u2
I: Validating ncurses-bin 6.0+20161126-1+deb9u2
I: Retrieving net-tools 1.60+git20161116.90da8a0-1
I: Validating net-tools 1.60+git20161116.90da8a0-1
I: Retrieving netbase 5.4
I: Validating netbase 5.4
I: Retrieving openssh-client 1:7.4p1-10+deb9u6
I: Validating openssh-client 1:7.4p1-10+deb9u6
I: Retrieving openssh-server 1:7.4p1-10+deb9u6
I: Validating openssh-server 1:7.4p1-10+deb9u6
I: Retrieving openssh-sftp-server 1:7.4p1-10+deb9u6
I: Validating openssh-sftp-server 1:7.4p1-10+deb9u6
I: Retrieving libssl1.0.2 1.0.2r-1~deb9u1
I: Validating libssl1.0.2 1.0.2r-1~deb9u1
I: Retrieving libpam-modules 1.1.8-3.6
I: Validating libpam-modules 1.1.8-3.6
I: Retrieving libpam-modules-bin 1.1.8-3.6
I: Validating libpam-modules-bin 1.1.8-3.6
I: Retrieving libpam-runtime 1.1.8-3.6
I: Validating libpam-runtime 1.1.8-3.6
I: Retrieving libpam0g 1.1.8-3.6
I: Validating libpam0g 1.1.8-3.6
I: Retrieving libpcre3 2:8.39-3
I: Validating libpcre3 2:8.39-3
I: Retrieving perl-base 5.24.1-3+deb9u5
I: Validating perl-base 5.24.1-3+deb9u5
I: Retrieving libprocps6 2:3.3.12-3+deb9u1
I: Validating libprocps6 2:3.3.12-3+deb9u1
I: Retrieving procps 2:3.3.12-3+deb9u1
I: Validating procps 2:3.3.12-3+deb9u1
I: Retrieving sed 4.4-1
I: Validating sed 4.4-1
I: Retrieving sensible-utils 0.0.9+deb9u1
I: Validating sensible-utils 0.0.9+deb9u1
I: Retrieving login 1:4.4-4.1
I: Validating login 1:4.4-4.1
I: Retrieving passwd 1:4.4-4.1
I: Validating passwd 1:4.4-4.1
I: Retrieving libsystemd0 232-25+deb9u11
I: Validating libsystemd0 232-25+deb9u11
I: Retrieving libudev1 232-25+deb9u11
I: Validating libudev1 232-25+deb9u11
I: Retrieving systemd 232-25+deb9u11
I: Validating systemd 232-25+deb9u11
I: Retrieving systemd-sysv 232-25+deb9u11
I: Validating systemd-sysv 232-25+deb9u11
I: Retrieving sysvinit-utils 2.88dsf-59.9
I: Validating sysvinit-utils 2.88dsf-59.9
I: Retrieving tar 1.29b-1.1
I: Validating tar 1.29b-1.1
I: Retrieving libwrap0 7.6.q-26
I: Validating libwrap0 7.6.q-26
I: Retrieving tzdata 2019a-0+deb9u1
I: Validating tzdata 2019a-0+deb9u1
I: Retrieving ucf 3.0036
I: Validating ucf 3.0036
I: Retrieving libustr-1.0-1 1.0.4-6
I: Validating libustr-1.0-1 1.0.4-6
I: Retrieving bsdutils 1:2.29.2-1+deb9u1
I: Validating bsdutils 1:2.29.2-1+deb9u1
I: Retrieving libblkid1 2.29.2-1+deb9u1
I: Validating libblkid1 2.29.2-1+deb9u1
I: Retrieving libfdisk1 2.29.2-1+deb9u1
I: Validating libfdisk1 2.29.2-1+deb9u1
I: Retrieving libmount1 2.29.2-1+deb9u1
I: Validating libmount1 2.29.2-1+deb9u1
I: Retrieving libsmartcols1 2.29.2-1+deb9u1
I: Validating libsmartcols1 2.29.2-1+deb9u1
I: Retrieving libuuid1 2.29.2-1+deb9u1
I: Validating libuuid1 2.29.2-1+deb9u1
I: Retrieving mount 2.29.2-1+deb9u1
I: Validating mount 2.29.2-1+deb9u1
I: Retrieving util-linux 2.29.2-1+deb9u1
I: Validating util-linux 2.29.2-1+deb9u1
I: Retrieving liblzma5 5.2.2-1.2+b1
I: Validating liblzma5 5.2.2-1.2+b1
I: Retrieving zlib1g 1:1.2.8.dfsg-5
I: Validating zlib1g 1:1.2.8.dfsg-5
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting libacl1...
I: Extracting libattr1...
I: Extracting libaudit-common...
I: Extracting libaudit1...
I: Extracting base-files...
I: Extracting base-passwd...
I: Extracting bash...
I: Extracting libbz2-1.0...
I: Extracting libdebconfclient0...
I: Extracting coreutils...
I: Extracting dash...
I: Extracting libdb5.3...
I: Extracting debconf...
I: Extracting debianutils...
I: Extracting diffutils...
I: Extracting dpkg...
I: Extracting e2fslibs...
I: Extracting e2fsprogs...
I: Extracting libcomerr2...
I: Extracting libss2...
I: Extracting findutils...
I: Extracting gcc-6-base...
I: Extracting libgcc1...
I: Extracting libc-bin...
I: Extracting libc6...
I: Extracting multiarch-support...
I: Extracting grep...
I: Extracting gzip...
I: Extracting hostname...
I: Extracting init-system-helpers...
I: Extracting libcap-ng0...
I: Extracting libgcrypt20...
I: Extracting libgpg-error0...
I: Extracting libselinux1...
I: Extracting libsemanage-common...
I: Extracting libsemanage1...
I: Extracting libsepol1...
I: Extracting lsb-base...
I: Extracting liblz4-1...
I: Extracting mawk...
I: Extracting libncursesw5...
I: Extracting libtinfo5...
I: Extracting ncurses-base...
I: Extracting ncurses-bin...
I: Extracting libpam-modules...
I: Extracting libpam-modules-bin...
I: Extracting libpam-runtime...
I: Extracting libpam0g...
I: Extracting libpcre3...
I: Extracting perl-base...
I: Extracting sed...
I: Extracting sensible-utils...
I: Extracting login...
I: Extracting passwd...
I: Extracting libsystemd0...
I: Extracting libudev1...
I: Extracting sysvinit-utils...
I: Extracting tar...
I: Extracting tzdata...
I: Extracting libustr-1.0-1...
I: Extracting bsdutils...
I: Extracting libblkid1...
I: Extracting libfdisk1...
I: Extracting libmount1...
I: Extracting libsmartcols1...
I: Extracting libuuid1...
I: Extracting mount...
I: Extracting util-linux...
I: Extracting liblzma5...
I: Extracting zlib1g...
I: Installing core packages...
I: Unpacking required packages...
I: Unpacking libacl1:amd64...
I: Unpacking libattr1:amd64...
I: Unpacking libaudit-common...
I: Unpacking libaudit1:amd64...
I: Unpacking base-files...
I: Unpacking base-passwd...
I: Unpacking bash...
I: Unpacking libbz2-1.0:amd64...
I: Unpacking libdebconfclient0:amd64...
I: Unpacking coreutils...
I: Unpacking dash...
I: Unpacking libdb5.3:amd64...
I: Unpacking debconf...
I: Unpacking debianutils...
I: Unpacking diffutils...
I: Unpacking dpkg...
I: Unpacking e2fslibs:amd64...
I: Unpacking e2fsprogs...
I: Unpacking libcomerr2:amd64...
I: Unpacking libss2:amd64...
I: Unpacking findutils...
I: Unpacking gcc-6-base:amd64...
I: Unpacking libgcc1:amd64...
I: Unpacking libc-bin...
I: Unpacking libc6:amd64...
I: Unpacking multiarch-support...
I: Unpacking grep...
I: Unpacking gzip...
I: Unpacking hostname...
I: Unpacking init-system-helpers...
I: Unpacking libcap-ng0:amd64...
I: Unpacking libgcrypt20:amd64...
I: Unpacking libgpg-error0:amd64...
I: Unpacking libselinux1:amd64...
I: Unpacking libsemanage-common...
I: Unpacking libsemanage1:amd64...
I: Unpacking libsepol1:amd64...
I: Unpacking lsb-base...
I: Unpacking liblz4-1:amd64...
I: Unpacking mawk...
I: Unpacking libncursesw5:amd64...
I: Unpacking libtinfo5:amd64...
I: Unpacking ncurses-base...
I: Unpacking ncurses-bin...
I: Unpacking libpam-modules:amd64...
I: Unpacking libpam-modules-bin...
I: Unpacking libpam-runtime...
I: Unpacking libpam0g:amd64...
I: Unpacking libpcre3:amd64...
I: Unpacking perl-base...
I: Unpacking sed...
I: Unpacking sensible-utils...
I: Unpacking login...
I: Unpacking passwd...
I: Unpacking libsystemd0:amd64...
I: Unpacking libudev1:amd64...
I: Unpacking sysvinit-utils...
I: Unpacking tar...
I: Unpacking tzdata...
I: Unpacking libustr-1.0-1:amd64...
I: Unpacking bsdutils...
I: Unpacking libblkid1:amd64...
I: Unpacking libfdisk1:amd64...
I: Unpacking libmount1:amd64...
I: Unpacking libsmartcols1:amd64...
I: Unpacking libuuid1:amd64...
I: Unpacking mount...
I: Unpacking util-linux...
I: Unpacking liblzma5:amd64...
I: Unpacking zlib1g:amd64...
I: Configuring required packages...
I: Configuring gcc-6-base:amd64...
I: Configuring lsb-base...
I: Configuring sensible-utils...
I: Configuring ncurses-base...
I: Configuring libsemanage-common...
I: Configuring libaudit-common...
I: Configuring libc6:amd64...
I: Configuring libbz2-1.0:amd64...
I: Configuring libgpg-error0:amd64...
I: Configuring libc-bin...
I: Configuring libdebconfclient0:amd64...
I: Configuring diffutils...
I: Configuring libcomerr2:amd64...
I: Configuring libcap-ng0:amd64...
I: Configuring libsepol1:amd64...
I: Configuring libgcc1:amd64...
I: Configuring libustr-1.0-1:amd64...
I: Configuring libsmartcols1:amd64...
I: Configuring libaudit1:amd64...
I: Configuring libtinfo5:amd64...
I: Configuring libudev1:amd64...
I: Configuring libattr1:amd64...
I: Configuring libss2:amd64...
I: Configuring liblzma5:amd64...
I: Configuring base-passwd...
I: Configuring e2fslibs:amd64...
I: Configuring liblz4-1:amd64...
I: Configuring debianutils...
I: Configuring libgcrypt20:amd64...
I: Configuring libncursesw5:amd64...
I: Configuring libdb5.3:amd64...
I: Configuring zlib1g:amd64...
I: Configuring hostname...
I: Configuring multiarch-support...
I: Configuring mawk...
I: Configuring libpcre3:amd64...
I: Configuring base-files...
I: Configuring libselinux1:amd64...
I: Configuring findutils...
I: Configuring libacl1:amd64...
I: Configuring ncurses-bin...
I: Configuring sed...
I: Configuring libsystemd0:amd64...
I: Configuring coreutils...
I: Configuring tar...
I: Configuring libsemanage1:amd64...
I: Configuring dpkg...
I: Configuring perl-base...
I: Configuring grep...
I: Configuring debconf...
I: Configuring tzdata...
I: Configuring gzip...
I: Configuring bsdutils...
I: Configuring dash...
I: Configuring init-system-helpers...
I: Configuring libpam0g:amd64...
I: Configuring libpam-modules-bin...
I: Configuring bash...
I: Configuring libpam-modules:amd64...
I: Configuring libpam-runtime...
I: Configuring passwd...
I: Configuring login...
I: Configuring libuuid1:amd64...
I: Configuring libblkid1:amd64...
I: Configuring libmount1:amd64...
I: Configuring mount...
I: Configuring libfdisk1:amd64...
I: Configuring util-linux...
I: Configuring e2fsprogs...
I: Configuring sysvinit-utils...
I: Configuring libc-bin...
I: Unpacking the base system...
I: Unpacking apt...
I: Unpacking libapt-pkg5.0:amd64...
I: Unpacking libdns-export162...
I: Unpacking libisc-export160...
I: Unpacking debian-archive-keyring...
I: Unpacking dialog...
I: Unpacking libelf1:amd64...
I: Unpacking libstdc++6:amd64...
I: Unpacking libc-l10n...
I: Unpacking locales...
I: Unpacking gpgv...
I: Unpacking ifupdown...
I: Unpacking init...
I: Unpacking iproute...
I: Unpacking iproute2...
I: Unpacking isc-dhcp-client...
I: Unpacking libkeyutils1:amd64...
I: Unpacking libgssapi-krb5-2:amd64...
I: Unpacking libk5crypto3:amd64...
I: Unpacking libkrb5-3:amd64...
I: Unpacking libkrb5support0:amd64...
I: Unpacking libbsd0:amd64...
I: Unpacking libedit2:amd64...
I: Unpacking libmnl0:amd64...
I: Unpacking net-tools...
I: Unpacking netbase...
I: Unpacking openssh-client...
I: Unpacking openssh-server...
I: Unpacking openssh-sftp-server...
I: Unpacking libssl1.0.2:amd64...
I: Unpacking libwrap0:amd64...
I: Unpacking ucf...
I: Configuring the base system...
I: Configuring libisc-export160...
I: Configuring dialog...
I: Configuring init...
I: Configuring libelf1:amd64...
I: Configuring gpgv...
I: Configuring libbsd0:amd64...
I: Configuring ucf...
I: Configuring libssl1.0.2:amd64...
I: Configuring debian-archive-keyring...
I: Configuring libc-l10n...
I: Configuring libstdc++6:amd64...
I: Configuring libkeyutils1:amd64...
I: Configuring net-tools...
I: Configuring libmnl0:amd64...
I: Configuring locales...
I: Configuring libwrap0:amd64...
I: Configuring netbase...
I: Configuring libedit2:amd64...
I: Configuring libapt-pkg5.0:amd64...
I: Configuring libdns-export162...
I: Configuring iproute2...
I: Configuring libkrb5support0:amd64...
I: Configuring isc-dhcp-client...
I: Configuring apt...
I: Configuring libk5crypto3:amd64...
I: Configuring ifupdown...
I: Configuring iproute...
I: Configuring libkrb5-3:amd64...
I: Configuring libgssapi-krb5-2:amd64...
I: Configuring openssh-client...
I: Configuring openssh-sftp-server...
I: Configuring openssh-server...
I: Configuring libc-bin...
I: Configuring systemd...
I: Base system installed successfully.
Download complete.
Copying rootfs to /var/lib/lxc/test/rootfs...Generating locales (this might take a while)...
  en_GB.UTF-8... done
  en_GB.UTF-8... done
Generation complete.
update-rc.d: error: cannot find a LSB script for checkroot.sh
update-rc.d: error: cannot find a LSB script for umountfs
update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
Creating SSH2 RSA key; this may take some time ...
2048 SHA256:D78T553s53Lj2WhCRa4zUYjzqOxvJEgM4gwr1kdfyCE root@toucan (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:WmGvWDt2oDVonC/4FkG0uMCwqE2ZfUJg9CiGTR3jXbQ root@toucan (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:KteZCP0aNYT50ISyZe9rRf1kDBSKGioYtSHDbe+nS+w root@toucan (ED25519)
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

Current default time zone: 'Etc/UTC'
Local time is now:      Tue May 21 13:27:04 UTC 2019.
Universal Time is now:  Tue May 21 13:27:04 UTC 2019.

Root password is 'root', please change !

When I try to start it, I get:

root@toucan:/usr/share/lxc/templates# lxc-start -n test
lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode.
lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.

Here are the logs:

lxc-start -n test -l debug -o test.out
 
root@toucan:/usr/share/lxc/templates# cat test.out
      lxc-start 20190521133113.575 INFO     lxc_start_ui - tools/lxc_start.c:main:275 - using rcfile /var/lib/lxc/test/config
      lxc-start 20190521133113.578 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:309 - Going to wait for pid 16264.
      lxc-start 20190521133113.581 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:328 - Trying to sync with child process.
      lxc-start 20190521133113.583 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20190521133113.583 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:366 - Using pipe file descriptor 5 for monitord.
      lxc-start 20190521133113.614 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:343 - Sucessfully synced with child process.
      lxc-start 20190521133113.618 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:312 - Finished waiting on pid 16264.
      lxc-start 20190521133113.621 INFO     lxc_container - lxccontainer.c:do_lxcapi_start:804 - Attempting to set proc title to [lxc monitor] /var/lib/lxc test
      lxc-start 20190521133113.626 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver nop
      lxc-start 20190521133113.627 DEBUG    lxc_start - start.c:setup_signal_fd:273 - Set SIGCHLD handler with file descriptor: 5.
      lxc-start 20190521133113.631 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:309 - Going to wait for pid 16268.
      lxc-start 20190521133113.633 DEBUG    console - console.c:lxc_console_peer_default:468 - no console peer
      lxc-start 20190521133113.633 INFO     lxc_start - start.c:lxc_init:475 - Container "test" is initialized.
      lxc-start 20190521133113.633 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:328 - Trying to sync with child process.
      lxc-start 20190521133113.635 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 4.
      lxc-start 20190521133113.636 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:366 - Using pipe file descriptor 5 for monitord.
      lxc-start 20190521133113.638 DEBUG    lxc_start - start.c:__lxc_start:1317 - Not dropping CAP_SYS_BOOT or watching utmp.
      lxc-start 20190521133113.638 INFO     lxc_cgroup - cgroups/cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for test
      lxc-start 20190521133113.643 DEBUG    lxc_cgfsng - cgroups/cgfsng.c:filter_and_set_cpus:474 - No isolated cpus detected.
      lxc-start 20190521133113.643 DEBUG    lxc_cgfsng - cgroups/cgfsng.c:handle_cpuset_hierarchy:644 - "cgroup.clone_children" was already set to "1".
      lxc-start 20190521133113.652 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWNS.
      lxc-start 20190521133113.653 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWPID.
      lxc-start 20190521133113.653 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWUTS.
      lxc-start 20190521133113.653 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWIPC.
      lxc-start 20190521133113.653 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWNET.
      lxc-start 20190521133113.659 DEBUG    lxc_conf - conf.c:setup_rootfs:1273 - mounted '/var/lib/lxc/test/rootfs' on '/usr/lib/x86_64-linux-gnu/lxc/rootfs'
      lxc-start 20190521133113.662 INFO     lxc_conf - conf.c:setup_utsname:901 - 'test' hostname has been setup
      lxc-start 20190521133113.662 INFO     lxc_conf - conf.c:setup_network:2473 - network has been setup
      lxc-start 20190521133113.662 INFO     lxc_conf - conf.c:mount_autodev:1130 - Mounting container /dev
      lxc-start 20190521133113.663 INFO     lxc_conf - conf.c:mount_autodev:1153 - Mounted tmpfs onto /usr/lib/x86_64-linux-gnu/lxc/rootfs/dev
      lxc-start 20190521133113.664 INFO     lxc_conf - conf.c:mount_autodev:1171 - Mounted container /dev
      lxc-start 20190521133113.664 INFO     lxc_conf - conf.c:fill_autodev:1199 - Creating initial consoles under container /dev
      lxc-start 20190521133113.664 INFO     lxc_conf - conf.c:fill_autodev:1210 - Populating container /dev
      lxc-start 20190521133113.664 INFO     lxc_conf - conf.c:fill_autodev:1247 - Populated container /dev
      lxc-start 20190521133113.665 INFO     lxc_conf - conf.c:setup_dev_console:1495 - console has been setup
      lxc-start 20190521133113.665 INFO     lxc_utils - utils.c:mount_proc_if_needed:1785 - I am 1, /proc/self points to ''
      lxc-start 20190521133113.665 INFO     lxc_utils - utils.c:mount_proc_if_needed:1812 - Mounted /proc in container for security transition
      lxc-start 20190521133113.670 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:343 - Sucessfully synced with child process.
      lxc-start 20190521133113.673 DEBUG    lxc_monitor - monitor.c:lxc_monitord_spawn:312 - Finished waiting on pid 16268.
      lxc-start 20190521133113.673 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:185 - Using monitor socket name "lxc/ad055575fe28ddd5//var/lib/lxc".
      lxc-start 20190521133113.909 DEBUG    lxc_conf - conf.c:setup_rootfs_pivot_root:1108 - pivot_root syscall to '/usr/lib/x86_64-linux-gnu/lxc/rootfs' successful
      lxc-start 20190521133113.107 ERROR    lxc_conf - conf.c:lxc_create_tty:3422 - No such file or directory - failed to create pty #0
      lxc-start 20190521133113.107 ERROR    lxc_conf - conf.c:lxc_setup:3939 - failed to create the ttys
      lxc-start 20190521133113.107 ERROR    lxc_start - start.c:do_start:811 - Failed to setup container "test".
      lxc-start 20190521133113.107 ERROR    lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 3)
      lxc-start 20190521133113.107 ERROR    lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "test".
      lxc-start 20190521133113.151 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.
      lxc-start 20190521133118.156 ERROR    lxc_start_ui - tools/lxc_start.c:main:366 - The container failed to start.
      lxc-start 20190521133118.156 ERROR    lxc_start_ui - tools/lxc_start.c:main:368 - To get more details, run the container in foreground mode.
      lxc-start 20190521133118.156 ERROR    lxc_start_ui - tools/lxc_start.c:main:370 - Additional information can be obtained by setting the --logfile and --logpriority options.

During the OS update, I chose to keep the old configuration files:

Configuration file '/etc/apparmor.d/abstractions/lxc/container-base'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** container-base (Y/I/N/O/D/Z) [default=N] ?


Configuration file '/etc/apparmor.d/abstractions/lxc/start-container'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** start-container (Y/I/N/O/D/Z) [default=N] ?


Configuration file '/etc/apparmor.d/lxc/lxc-default-with-nesting'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** lxc-default-with-nesting (Y/I/N/O/D/Z) [default=N] ?


--- /etc/apparmor.d/lxc/lxc-default-with-nesting        1970-01-01 01:00:00.000000000 +0100
+++ /etc/apparmor.d/lxc/lxc-default-with-nesting.dpkg-new       2018-01-29 23:23:36.000000000 +0100
@@ -0,0 +1,14 @@
+# Do not load this file.  Rather, load /etc/apparmor.d/lxc-containers, which
+# will source all profiles under /etc/apparmor.d/lxc
+
+profile lxc-container-default-with-nesting flags=(attach_disconnected,mediate_deleted) {
+  #include <abstractions/lxc/container-base>
+  #include <abstractions/lxc/start-container>
+
+  deny /dev/.lxc/proc/** rw,
+  deny /dev/.lxc/sys/** rw,
+  mount fstype=proc -> /var/cache/lxc/**,
+  mount fstype=sysfs -> /var/cache/lxc/**,
+  mount options=(rw,bind),
+  mount fstype=cgroup -> /sys/fs/cgroup/**,
+}

If anyone has an idea…
Thank you :slight_smile:

Blaise


(Blaise) #2

The following line was missing in the container’s config file :

lxc.include = /usr/share/lxc/config/debian.common.conf

It is no longer automatically added when creating a container? Did I miss something?