Howdy!
Today I’ve decided to migrate one of my Proxmox’s LXC containers to LXD, because in my experience it looks like that Proxmox doesn’t fit my needs too well (Proxmox is better if you want to host multiple VMs, if you are building a data center, etc… while my needs are just Docker containers with some stateful containers with LXC)
So I’ve decided to migrate one of my Proxmox containers to LXC, and the first thing that I’ve noticed was… network doesn’t work! Weirdly enough, networking worked if I started a ubuntu:18.04
container, so what gives?
Then I noticed that it was using the IP that I was using in Proxmox, so I found where the network config was (/etc/systemd/network
) and edited the config to enable DHCP, then it worked!
Weirdly enough, copying the netplan config from the working ubuntu:18.04
container to the imported container… aaaaand it didn’t work, for some reason netplan --debug apply
doesn’t apply the Netplan config, like it didn’t exist.
That preramble above was just so if anyone had the same issue while importing a LXC container created via Proxmox. :3
The real issue is that, for some reason that I can’t figure out why, the docker0
interface is being bound to the imported container and bound to 192.168.0.1
. The container is created via lxc launch
.
+--------+---------+-----------------------------+------------------------------------------------------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+--------+---------+-----------------------------+------------------------------------------------------+-----------+-----------+
| jvgm45 | RUNNING | 192.168.0.1 (docker0) | fd7a:115c:a1e0:ab12:4843:cd96:626c:e61f (tailscale0) | CONTAINER | 0 |
| | | 100.108.230.31 (tailscale0) | fd42:7e2d:8889:cfb2:216:3eff:fe5d:d00b (eth0) | | |
| | | 10.139.19.27 (eth0) | | | |
+--------+---------+-----------------------------+------------------------------------------------------+-----------+-----------+
| test | RUNNING | 10.139.19.172 (eth0) | fd42:7e2d:8889:cfb2:216:3eff:fe55:9030 (eth0) | CONTAINER | 0 |
+--------+---------+-----------------------------+------------------------------------------------------+-----------+-----------+
What could cause this? I think it is a configuration within the container, but I can’t for the life of me figure out why this happens.