[systemd-devel] machinectl login <system>: Failed to get machine PTY: Unit container-getty at 0.service failed to load: No such file or directory.

David Herrmann dh.herrmann at gmail.com
Thu Mar 19 06:44:54 PDT 2015


Hi

On Tue, Mar 17, 2015 at 4:54 PM, Peter Paule <systemd-devel at fedux.org> wrote:
> Hi,
>
> starting a container works fine. I'm running now systemd from git. Last
> commit is 1b41981d9a62443d566df6bcabc1b5024e9f5e4a which changes things with
> "container-getty".
>
>   $ sudo machinectl start test-server
>
>   $ sudo machinectl status test-server
>   test-server
>              Since: Tue 2015-03-17 16:41:34 CET; 3s ago
>             Leader: 707 (systemd)
>            Service: nspawn; class container
>               Root: /var/lib/machines/test-server
>              Iface: ve-test-server
>                 OS: CentOS Linux 7 (Core)
>               Unit: systemd-nspawn at test\x2dserver.service
>                     ├─706 /usr/bin/systemd-nspawn --quiet --keep-unit --boot
> --link-journal=try-guest --network-veth --machine=test-server
>                     ├─707 /usr/lib/systemd/systemd
>                     └─system.slice
>                       ├─dbus.service
>                       │ └─751 /bin/dbus-daemon --system --address=systemd:
> --nofork --nopidfile --systemd-activation
>                       ├─systemd-journald.service
>                       │ └─724 /usr/lib/systemd/systemd-journald
>                       ├─systemd-logind.service
>                       │ └─750 /usr/lib/systemd/systemd-logind
>                       ├─console-getty.service
>                       │ └─757 /sbin/agetty --noclear -s console 115200 38400
> 9600
>                       └─rails-app.service
>                         └─749 /usr/local/bin/ruby script/rails server
>
>   Mar 17 16:41:35 test1.ib.vrnetze.de systemd-nspawn[706]: Starting Console
> Getty...
>   Mar 17 16:41:35 test1.ib.vrnetze.de systemd-nspawn[706]: [  OK  ] Started
> Console Getty.
>   Mar 17 16:41:35 test1.ib.vrnetze.de systemd-nspawn[706]: [  OK  ] Reached
> target Login Prompts.
>   Mar 17 16:41:35 test1.ib.vrnetze.de systemd-nspawn[706]: [  OK  ] Started
> Dump dmesg to /var/log/dmesg.
>   Mar 17 16:41:35 test1.ib.vrnetze.de systemd-nspawn[706]: [  OK  ] Started
> Login Service.
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: [FAILED] Failed
> to start LSB: Bring up/down networking.
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: See 'systemctl
> status network.service' for details.
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: [  OK  ] Reached
> target Multi-User System.
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: CentOS Linux 7
> (Core)
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: Kernel
> 3.18.6-1-ARCH on an x86_64
>
>
> But when I tried to login I get the following error message:
>
>   $ sudo machinectl login test-server
>   Failed to get machine PTY: Unit container-getty at 0.service failed to load:
> No such file or directory.

The file container-getty at .service is available in your container?
/sbin/agetty is available in your container?

Thanks
David

> I would like to troubleshoot
>
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: [FAILED] Failed
> to start LSB: Bring up/down networking.
>   Mar 17 16:41:36 test1.ib.vrnetze.de systemd-nspawn[706]: See 'systemctl
> status network.service' for details.
>
> Is there another way to get a login prompt or fix the error above?
>
> /pp
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list