[lxc-users] LXC Logfile Path on Debian Jessie

Andrew Davidson andrew at amdavidson.com
Sun Feb 14 14:52:24 UTC 2016


I just set up a new Debian Jessie server for hosting LXC containers and am running into an issue with using a non-default location. I have a Btrfs volume at /store with a subvolume at /store/lxc 

In /etc/lxc/lxc.conf I have only the following line: 
	lxc.lxcpath = /store/lxc

I create and start a container: 
	# lxc-create -B btrfs -n test -t debian -- -r jessie -a amd64                                                                                                                                            
	 debootstrap is /usr/sbin/debootstrap
	Checking cache download in /var/cache/lxc/debian/rootfs-jessie-amd64 ... 
	Copying rootfs to /store/lxc/test/rootfs...Generating locales (this might take a while)...
	  en_US.UTF-8... done
	Generation complete.
	insserv: warning: current start runlevel(s) (empty) of script `checkroot.sh' overrides LSB defaults (S).
	insserv: warning: current stop runlevel(s) (S) of script `checkroot.sh' overrides LSB defaults (empty).
	insserv: warning: current start runlevel(s) (empty) of script `checkroot.sh' overrides LSB defaults (S).
	update-rc.d: error: umountfs Default-Start contains no runlevels, aborting.
	insserv: warning: current start runlevel(s) (empty) of script `hwclock.sh' overrides LSB defaults (S).
	insserv: warning: current stop runlevel(s) (0 6 S) of script `hwclock.sh' overrides LSB defaults (0 6).
	update-rc.d: error: cannot find a LSB script for hwclockfirst.sh
	Creating SSH2 RSA key; this may take some time ...
	2048 2f:4c:3d:00:6e:1f:51:f9:b8:cf:23:60:36:57:51:d9 /etc/ssh/ssh_host_rsa_key.pub (RSA)
	Creating SSH2 DSA key; this may take some time ...
	1024 be:65:5d:fd:e6:2e:22:3c:83:38:22:38:36:34:14:5b /etc/ssh/ssh_host_dsa_key.pub (DSA)
	Creating SSH2 ECDSA key; this may take some time ...
	256 34:32:ac:96:57:19:86:04:4e:47:82:81:ca:7e:89:f6 /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA)
	Creating SSH2 ED25519 key; this may take some time ...
	256 65:b5:d9:92:5a:94:19:d4:32:b8:f9:4b:c9:59:e6:f7 /etc/ssh/ssh_host_ed25519_key.pub (ED25519)
	Failed to read /proc/cmdline. Ignoring: No such file or directory
	invoke-rc.d: policy-rc.d denied execution of start.
	Current default time zone: 'America/New_York'
	Local time is now:      Sun Feb 14 09:32:45 EST 2016.
	Universal Time is now:  Sun Feb 14 14:32:45 UTC 2016.
	Root password is 'z2r3UAg7', please change !
	
	# lxc-start -n test -d
	lxc-start: failed to open log file "/var/lib/lxc/test/test.log" : No such file or directory 

The log file seems to be stuck at the old location, I don’t have anything set in /etc/lxc/default.conf for lxc.logfile or lxc.console.logfile.

It seems to me that the log file should follow lxc.lxcpath, but if someone can point me to the best configuration for default.conf to make it generic to all created containers, that would be fine too.

If it’s not assumed: 
	$ apt-cache show lxc
	Package: lxc
	Version: 1:1.0.6-6+deb8u2


Also, is there a way to set Btrfs as the default backing store? 

Thanks,

-- Andrew Davidson


More information about the lxc-users mailing list