Macvlan and physical lan

I have a database app that I’m migrating to lxd, I notice something different:

  1. the original setup, the database is hosted in a real pc, clients connect to it over tcp/ip, the connection never disconnects.

  2. now I move to a lxd instance, macvlan, it works, but connection drops after a while not using it

any idea why? Thanks,


There should’t be a disconnection related to LXD. Being macvlan, the networking should be transparent and not affected in any way by LXD.

Have a look at

  1. any DB logs in the container. Also, add debug logs.
  2. trying to figure out when you get those disconnects, then use tcpdump or tshark to capture the network packets. You should be able to capture the network traffic of the disconnection and probably find who is at fault.