<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - systemd-nspawn: Spawning a shell in a container does not work"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90104">90104</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>systemd-nspawn: Spawning a shell in a container does not work
</td>
</tr>
<tr>
<th>Product</th>
<td>systemd
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>registo.mailling@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>systemd-bugs@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>As the summary says, spawning a shell in a container does not work but works if
running from a command line.
I have a service file to launch a centos container and it was working with
systemd 218. After the update to systemd 219 it stopped working.
The .service file used the following ExecStart line:
/usr/bin/systemd-nspawn --keep-unit --machine=centos --link-journal=no
--bind=/home/centos:/home --tmpfs=/tmp:mode=1777 --network-bridge=brkvm
--directory=/virt/containers/centos
When trying to start the container I get the following in the journal:
<span class="quote">> journalctl -b -u centos -o cat</span >
Started CentOS Container.
Starting CentOS Container...
Spawning container centos on /virt/containers/centos.
Press ^] three times within 1s to kill container.
Stopping CentOS Container...
Stopped CentOS Container.
If I use the same invocation (except --keep-unit) on a command line I am able
to get a shell inside the container.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>