[systemd-devel] systemd-nspawn and process spawning using nsenter issue

Aliaksei Sheshka sheshkaoss at gmail.com
Mon Nov 2 17:35:17 PST 2015


>
> Note that all units you join need to have PrivateNetwork=yes set if
> they shall live in the same namespace. Did both your units have this set?

I have my unit c7-test like that:

ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot
--link-journal=try-guest --network-macvlan=eth0 --settings=override
--machine=c7-test

--networ-macvlan assumes  PrivateNetwork as I understand.
If I add additional  "PrivateNetwork=yes" to that nspawn unit, it
won't work, since, obviously, eth0 is no longer available.

In short my goal to have macvlan enabled systemd-nspawn container
running. Once it's up, I would like to run a daemon withing that
container ip namespace using binary located on the host system.
Current 'nsenter' solution looks not that elegant.  Perhaps there is a
better way to achieve that.


More information about the systemd-devel mailing list