Hello,

A little bit back I wrote in about having some difficulties adding network 
devices to containers. With some help from the list, I figured out how to add 
my network devices to an already running container using 'iw phy' and 'ip 
link'.

However, I have not yet successfully added an interface to a container by way 
of the --network-interface flag. Attempting to add any ethernet devices by this 
method meets with the error:

[root@host01 lanvpn]# systemd-nspawn --network-interface=eth1                   
                                                                            
Spawning container lanvpn on /home/lanvpn.
Press ^] three times within 1s to kill container.
Failed to move interface eth1 to namespace: File exists

According to the systemd-nspawn documentation, it seems like this invocation 
should work

       --network-interface=
           Assign the specified network interface to the container. This will 
remove the specified interface from the calling namespace and place it in the 
container.
           When the container terminates, it is moved back to the host 
namespace. Note that --network-interface= implies --private-network. This 
option may be used more
           than once to add multiple network interfaces to the container.

If I'm doing something wrong, then it seems like the documentation may desire 
revisiting. If I'm not, then this could be unintended behavior.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to