Skip to content

Instantly share code, notes, and snippets.

@eliasp
Last active June 29, 2016 12:25
Show Gist options
  • Save eliasp/9a549a4c9b077cc18304fe03eca46fa5 to your computer and use it in GitHub Desktop.
Save eliasp/9a549a4c9b077cc18304fe03eca46fa5 to your computer and use it in GitHub Desktop.
mkdir -p /var/tmp/machines
debootstrap jessie /var/tmp/machines/debian-jessie http://httpredir.debian.org/debian
cd /var/tmp/machines/debian-jessie
# https://github.com/systemd/systemd/issues/2728
tar cf - . | machinectl import-tar - debian-jessie
systemd-nspawn -D /var/lib/machines/debian-jessie passwd -d root
systemd-nspawn -D /var/lib/machines/debian-jessie apt-get update
systemd-nspawn -D /var/lib/machines/debian-jessie apt-get install -y wget ca-certificates dbus
# https://github.com/systemd/systemd/issues/852#issuecomment-127759667
systemd-nspawn -D /var/lib/machines/debian-jessie /bin/rm /etc/securetty
machinectl read-only debian-jessie
machinectl clone debian-jessie debian-jessie-test
machinectl start debian-jessie-test

Try to login

machinectl login debian-jessie-test
  • Result: Failed to get login PTY: Connection timed out

Check status of dbus in container

systemctl -M debian-jessie-test status dbus
  • Result: Failed to get properties: Connection timed out

Check container journal

journalctl --directory=/var/lib/machines/debian-jessie-test/var/log/journal/ -e
  • Result:
Jun 29 14:16:33 moria systemd[1]: Started getty on tty2-tty6 if dbus and logind are not available.
Jun 29 14:16:33 moria systemd[1]: Starting D-Bus System Message Bus...
Jun 29 14:16:33 moria systemd[1]: Started D-Bus System Message Bus.
Jun 29 14:16:33 moria systemd[59]: Failed at step OOM_ADJUST spawning /usr/bin/dbus-daemon: Permission denied
Jun 29 14:16:33 moria systemd-journal[20]: Forwarding to syslog missed 12 messages.
Jun 29 14:16:33 moria cron[56]: (CRON) INFO (pidfile fd = 3)
Jun 29 14:16:33 moria cron[56]: (CRON) INFO (Running @reboot jobs)
Jun 29 14:16:33 moria networking[23]: Configuring network interfaces...done.
Jun 29 14:16:58 moria systemd[1]: Failed to register match for Disconnected message: Connection timed out
Jun 29 14:16:58 moria systemd-logind[58]: Failed to add match for NameOwnerChanged: Connection timed out
Jun 29 14:16:58 moria systemd-logind[58]: Failed to fully start up daemon: Connection timed out
Jun 29 14:17:01 moria CRON[62]: pam_env(cron:session): Unable to open env file: /etc/default/locale: No such file or directory
Jun 29 14:17:01 moria CRON[62]: pam_unix(cron:session): session opened for user root by (uid=0)
Jun 29 14:17:01 moria CRON[63]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jun 29 14:17:01 moria CRON[62]: pam_unix(cron:session): session closed for user root
Jun 29 14:17:23 moria systemd[1]: Failed to register match for Disconnected message: Connection timed out
Jun 29 14:17:23 moria systemd[1]: Starting System Logging Service...
Jun 29 14:17:23 moria systemd[1]: Starting Permit User Sessions...
Jun 29 14:17:23 moria systemd-journal[20]: Forwarding to syslog missed 13 messages.
Jun 29 14:17:23 moria systemd[1]: Started /etc/rc.local Compatibility.
Jun 29 14:17:23 moria systemd[1]: systemd-logind.service: main process exited, code=exited, status=1/FAILURE
Jun 29 14:17:23 moria systemd[1]: Failed to start Login Service.
Jun 29 14:17:23 moria systemd[1]: Unit systemd-logind.service entered failed state.
Jun 29 14:17:23 moria systemd[1]: dbus.service: main process exited, code=exited, status=206/OOM_ADJUST
Jun 29 14:17:23 moria systemd[1]: Unit dbus.service entered failed state.
Jun 29 14:17:23 moria systemd[1]: systemd-logind.service has no holdoff time, scheduling restart.
Jun 29 14:17:23 moria systemd[1]: Started Permit User Sessions.
Jun 29 14:17:23 moria systemd[1]: Started System Logging Service.
Jun 29 14:17:23 moria systemd[1]: Looping too fast. Throttling execution a little.
Jun 29 14:17:24 moria systemd[1]: Looping too fast. Throttling execution a little.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment