diff --git a/man/systemd.nspawn.xml b/man/systemd.nspawn.xml index 1db41a1b72..6492a8911a 100644 --- a/man/systemd.nspawn.xml +++ b/man/systemd.nspawn.xml @@ -585,6 +585,26 @@ + + NamespacePath= + + Takes the path to a file representing a kernel + network namespace that the container shall run in. The specified path + should refer to a (possibly bind-mounted) network namespace file, as + exposed by the kernel below /proc/$PID/ns/net. + This makes the container enter the given network namespace. One of the + typical use cases is to give a network namespace under + /run/netns created by ip-netns8, + for example, NamespacePath=/run/netns/foo. + Note that this option cannot be used together with other + network-related options, such as Private= + or Interface=. This option corresponds to the + command line switch. + + + + VirtualEthernet= diff --git a/src/nspawn/nspawn-gperf.gperf b/src/nspawn/nspawn-gperf.gperf index 7a8a8d8b3d..9c886f7121 100644 --- a/src/nspawn/nspawn-gperf.gperf +++ b/src/nspawn/nspawn-gperf.gperf @@ -73,6 +73,7 @@ Files.PrivateUsersOwnership, config_parse_userns_ownership, 0, Files.BindUser, config_parse_bind_user, 0, offsetof(Settings, bind_user) Files.BindUserShell, config_parse_bind_user_shell, 0, 0 Network.Private, config_parse_tristate, 0, offsetof(Settings, private_network) +Network.NamespacePath, config_parse_path, 0, offsetof(Settings, network_namespace_path) Network.Interface, config_parse_network_iface_pair, 0, offsetof(Settings, network_interfaces) Network.MACVLAN, config_parse_macvlan_iface_pair, 0, offsetof(Settings, network_macvlan) Network.IPVLAN, config_parse_ipvlan_iface_pair, 0, offsetof(Settings, network_ipvlan)