Create and attach a nic to another network namespace.
lxc-user-nic \kx {pid} {type} {bridge} [nicname]
lxc-user-nic is a setuid-root program with which unprivileged users may create network interfaces for use by a lxc container.
It will consult the configuration file \*(T</etc/lxc/lxc-usernet\*(T> to determine the number of interfaces which the calling user is allowed to create, and which bridge he may attach them to. It tracks the number of interfaces each user has created using the file \*(T</run/lxc/nics\*(T>. It ensures that the calling user is privileged over the network namespace to which the interface will be attached.
pid
The process id for the task to whose network namespace the interface should be attached.
type
The network interface type to attach. Currently only veth is supported. With this type, two interfaces representing each tunnel endpoint are created. One endpoint will be attached to the specified bridge, while the other will be passed into the container.
bridge
The bridge to which to attach the network interface, for instance \*(T<lxcbr0\*(T>.
nicname
The desired interface name in the container. This will be \*(T<eth0\*(T> if unspecified.
These options are common to most of lxc commands.
\*(T<-?, -h, --help\*(T>
Print a longer usage message than normal.
\*(T<--usage\*(T>
Give the usage message
\*(T<-q, --quiet\*(T>
mute on
\*(T<-P, --lxcpath=\*(T>PATH
Use an alternate container path. The default is /var/lib/lxc.
\*(T<-o, --logfile=\*(T>FILE
Output to an alternate log FILE. The default is no log.
\*(T<-l, --logpriority=\*(T>LEVEL
Set log priority to LEVEL. The default log priority is \*(T<ERROR\*(T>. Possible values are : \*(T<FATAL\*(T>, \*(T<CRIT\*(T>, \*(T<WARN\*(T>, \*(T<ERROR\*(T>, \*(T<NOTICE\*(T>, \*(T<INFO\*(T>, \*(T<DEBUG\*(T>.
Note that this option is setting the priority of the events log in the alternate log file. It do not have effect on the ERROR events log on stderr.
\*(T<-n, --name=\*(T>NAME
Use container identifier NAME. The container identifier format is an alphanumeric string.
lxc(1), lxc-start(1), lxc-usernet(5)
Daniel Lezcano <\*(T<[email protected]\*(T>>