[systemd-devel] systemd-nspawn and IPv6

Kai Krakow hurikhan77 at gmail.com
Sun Apr 26 07:50:37 PDT 2015


Hello!

I've successfully created a Gentoo container on top of a Gentoo host. I can 
start the container with machinectl. I can also login using SSH. So mission 
almost accomblished (it should become a template for easy vserver cloning).

But from within the IPv6-capable container I cannot access the IPv6 outside 
world. Name resolution via IPv6 fails, as does pinging to IPv6. It looks 
like systemd-nspawn does only setup IPv4 routes to access outside my gateway 
boundary. IPv6 does not work.

I may be missing kernel options or some setup. But before poking around 
blindly, I'd like to ask if there's a known problem with systemd-nspawn or 
known configuration caveats.

Here's the service file (modified to bind the portage and src tree):

# /etc/systemd/system/systemd-nspawn at gentoo\x2dcontainer\x2dbase.service
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Container %I
Documentation=man:systemd-nspawn(1)
PartOf=machines.target
Before=machines.target

[Service]
ExecStart=/usr/bin/systemd-nspawn --quiet --keep-unit --boot --link-
journal=try-guest --network-veth --machine=%I --bind=/usr/portage --bind-
ro=/usr/src
KillMode=mixed
Type=notify
RestartForceExitStatus=133
SuccessExitStatus=133
Delegate=yes
MemoryLimit=4G

[Install]
WantedBy=machines.target


-- 
Replies to list only preferred.



More information about the systemd-devel mailing list