Hello,
Is there any way to switch the LXC container default bridge lxcbr0 to other bridge (eg:br0 which i created) without restarting the container.
Thank you.
Hello,
Is there any way to switch the LXC container default bridge lxcbr0 to other bridge (eg:br0 which i created) without restarting the container.
Thank you.
Yes, you can manually use brctl show
to locate the interfaces on the old bridge and then disconnect them with brctl delif
and attach them to the other bridge with brctl addif
.
(I know that brctl
is deprecated in favor of ip
but I can’t remember the ip syntax for this :))
Thank you for your reply.
Actually i am doing lxc container based test cases for server and client. Both server and client application is running in a separate container earlier case for switching the bridge of the container running client i modified the container config file (/var/lib/lxc/container_name/config in this file i modify the lxcbr0 to br0 and restarting the container). I tried the brctl command for changing the bridge by removing the interface but its not working. When i start the container initially interface was “vethXXX”.