I created a systemd link file to enforce persistent network interface naming for a stack of network-booted hosts. Because the MAC varies between machines, I have to use the PCI path for matching the interface:



This works in a VM or on a physical box. However, in a netboot host it fails with message:

Failed at step NAMESPACE spawning /usr/lib/systemd/system/systemd-networkd: Invalid Argument

I tried removing the link file and rebooting, but with the same result. So it has nothing to do with my link file.

The netboot host is made from Centos 7.2.

Previously, with CentOS 6, we used a persistent net rule in /etc/udev.rules, but that fails under CentOS 7.


Systemd has a number of options you can set in a service's unit file for protecting specific directories in the filesystem. This is done using filesystem namespacing.

It appears that this functionality isn't supported in a PXE-booted host, so services that require it will fail to start.

In the case of systemd-networkd, this can be fixed by disabling all options that require namespacing.

First, create a copy of the service file. Files in /etc/systemd will override the defaults in /usr/lib/systemd:

cp /usr/lib/systemd/system/networkd-systemd.service /etc/systemd/systemd/

Now edit /etc/systemd/system/systemd-networkd.service, removing namespace protection:


Finally, restart the daemon:

systemctl restart networkd-systemd

Warning: This may expose security risks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.