[systemd-devel] systemd-nspawn: starting multiple shells

Lennart Poettering lennart at poettering.net
Mon Jun 25 10:55:05 UTC 2018


On Sa, 23.06.18 21:57, Nikolaus Rath (Nikolaus at rath.org) wrote:

> On Jun 23 2018, Nikolaus Rath <Nikolaus at rath.org> wrote:
> > On Jun 23 2018, aleivag <aleivag at gmail.com> wrote:
> >> short answer, yes, `machinectl login` is only suppported for systemd-init ,
> >> and `machinectl shell` `systemd-run` will try to talk to the container via
> >> dbus, so i dont think you are force to have systemd runing inside the
> >> container (i may be wrong) but you do need to have dbus (and its easy to
> >> just have systemd).  if you dont need it, you can always use nsenter to
> >> access a namespace on your machine
> >
> > Still not working:
> [..]
> > $ sudo machinectl shell root at iofabric
> > [sudo] password for nikratio: 
> > Failed to get shell PTY: Cannot set property
> > StandardInputFileDescriptor, or unknown property.
> 
> So this seems to be caused by systemd in the container being too old,
> and is therefore not available here.
> 
> The 'nsenter' approach seems to work so far, but I don't see a generally
> applicable way to figure out the right PID. Is there a trick for
> that?

machinectl show --value $MACHINE -p Leader

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list