Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#73384 - machinectl shell fails with Ubuntu container

Attached to Project: Arch Linux
Opened by Andrew Lipscomb (ALTinners) - Monday, 17 January 2022, 02:01 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 11 February 2022, 20:46 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Creating a new Ubuntu container as per the instructions at does not allow the created container to have the `machinectl shell root@vm-focal /bin/bash` command run. Previously this has worked.

The container can be ran via `systemd-nspawn` without the `-b` option and seems intact and usable.

However any command run via `machinectl shell` for a running container causes a coredump - even simple ones like `ls`

Only an Ubuntu container seems to do this - an equivalently made arch container runs just fine. I have not tried Debian.
Checking the upstream systemd repo is not showing anything like this at the moment.

Additional info:
* systemd 250.2-2
* linux 5.16.arch1-1
* Systemd cat for the `systemd-nspawn@vm-ubuntu.service`
* Journal output for the `systemd-nspawn@vm-ubuntu.service`
* `SYSTEMD_LOG_LEVEL=debug machinectl shell vm-focal /bin/ls` output

Steps to reproduce:
* Create a container with a bootable ubuntu systemd `debootstrap --include=systemd-container --components=main,universe focal /var/lib/machines/vm-focal`
* Set the password for root
systemd-nspawn -D /var/lib/machines/vm-focal
* Start the container `machinectl start vm-focal`
* Attempt a trivial shell call ie: `machinectl shell vm-focal /bin/true`
This task depends upon

Comment by Andrew Lipscomb (ALTinners) - Monday, 17 January 2022, 02:05 GMT
Reading through the manual for ways to not use machinectl - it seems `systemd-run` can also work here with a similar syntax.

This appears to work correctly.

andrew.lipscomb@andrew:~$ sudo systemd-run --machine vm-focal --pty /bin/bash
Running as unit: run-u10.service
Press ^] three times within 1s to disconnect TTY.