[systemd-devel] Machinectl shell/login do not attach to console

Chris Bell cwbell at narmos.org
Mon Oct 12 07:40:58 PDT 2015


On 2015-10-05 12:30, Chris Bell wrote:
> I have an Arch machine with systemd 226, running an Arch container,
> also with systemd 226. For whatever reason in 225, `machinectl login`
> stopped working correctly, and in 226 `machinectl login` does not work
> properly. It attaches to the machine, but does not seem to redirect
> stdin and stdout to the machine. When I attempt to use login, the
> login prompt is never printed to the command line:

So I've done some more testing, and have not been able to come up with 
any solution. I have also simplified the scenario for the error:

First, I start the machine from a shell using:

# systemd-nspawn --boot --network-bridge=br0 --machine=gitlab

It boots and drops me to a login prompt:

Spawning container gitlab on /var/lib/machines/gitlab.
Press ^] three times within 1s to kill container.
systemd 226 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR 
+SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 
+SECCOMP +BLKID -ELFUTILS +KMOD +IDN)
Detected virtualization systemd-nspawn.
Detected architecture x86-64.

Welcome to Arch Linux!
<SNIP>
[  OK  ] Reached target Multi-User System.

Arch Linux 4.1.6-1-ARCH (console)

gitlab login:

Where I can log in as root and use the machine as normal. If I attempt 
to spawn a `machinectl shell` from a second bash shell, it simply gives 
me the 'press ^] thre times...to exit' message. The login prompt is then 
printed on the original bash shell - the one where systemd-nspawn is 
running. All stdin and stdout is redirected from the shell that started 
'systemd-nspawn' - the shell where I ran 'machinectl shell' doesn't 
respond to anything but the kill command.

I could really use some help here!

Thanks,
Chris


More information about the systemd-devel mailing list