[lxc-users] rename veth interfaces on the host

Fajar A. Nugraha list at fajar.net
Tue Mar 7 21:57:01 UTC 2017


On Tue, Mar 7, 2017 at 11:51 PM, Spike <spike at drba.org> wrote:

> thanks Fajar, that worked perfectly. That said, I'm still very new to
> lxd/lxc and the only way I could get that done was to run:
>
> lxc config edit <container>
>
> how would I have set the property for the device? I tried:
>
>

Did you try "lxc help config"? It should print

...
lxc config device set [<remote>:]<container> <device> <key> <value>
  Set a device property.
...



> lxc config device set x1 eth0.host_name = veth_c1_eth0
>
> but that didn't work and I got back "The device doesn't exist". However
> this did list eth0 as a device:
>
>
lxc config device set x1 eth0 host_name veth_c1_eth0

One practical tip: since interface names are limited in length, I usually
abbreviate them to something like "v_c1_0" to give more room to include
container name.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170308/cec01d99/attachment-0001.html>


More information about the lxc-users mailing list