I’m testing live migration of containers between 2 LXD hosts (LXD 3.7).
Both the LXD hosts are configured to use the same internal network for the containers:
config: ipv4.address: 10.10.0.1/24 ipv4.nat: "true" ipv6.address: none
so that each container, after a live migration, maintains the previous IP address, and everything works as expected.
Now I’m trying to expose the port 80 inside the container to the internet, using the LXD proxy feature:
lxc config device add <container> proxy8081 proxy listen=tcp:0.0.0.0:8081 connect=tcp:<container_ip>:80
This actually works.
From a remote client I can see the website in the container at the address: http://<lxd_node>:8081
Unfortunately, it seems that the live migration of the container doesn’t maintain the proxy configuration.
Or, more precisely, I can see that the proxy configuration is correctly copied:
lxc config device get <container> proxy8081 connect tcp:<container_ip>:80
but it doesn’t work, until I restart the container.
Am I missing something, or this isn’t yet supported?