Since a few weeks I get the error below on VMs on Ubuntu 20.04 LTS.
lxc start VM-DA-01
Error: Failed to start device "eth0": Failed to set the MAC address: Failed to run: ip link set dev mac217a72af address 02:00:00:EX:AM:PLE exit status 2 (RTNETLINK answers: Address already in use)
I use MACVLAN with MAC Address assignment. Nothing special. This problem has been happening for a while (1 or 2 weeks?) and then I can’t start the VMs. I have to reboot the host after this error.
Hi, not that this helps you, but I’m having the same issue on Ubuntu Server 22.04 x86_64 on a physical server and LXD Snap 5.7-c62733b. Using MACVLAN for instances.
Windows VM disconnects from the network, and when I restart it LXD errors with the same message and it won’t start the VM.
Just restarted the host recently for this, but will try find a way around this for now.
I notice that the dev name changes every time I try start the VM…
Failed to run: ip link set dev macd8b62eeb address 00:16:3e:87:19:1f
Failed to run: ip link set dev macef515ed2 address 00:16:3e:87:19:1f
Failed to run: ip link set dev mac99318f7d address 00:16:3e:87:19:1f
...
You can manually delete the device and start the VM:
ip link show | grep -B 1 '00:16:3e:87:19:1f'
29: maca35b59f9@eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 500
link/ether 00:16:3e:87:19:1f brd ff:ff:ff:ff:ff:ff
sudo ip link delete maca35b59f9
lxc start vmname
The issue is that all my VMs are having this issue, Windows and even Ubuntu Desktop image from the default repo images.linuxcontainers.org and while they are running, so not just a thing at reboot. They are dropping off the network.
OK please provide more info on what you are seeing as “failed connectivity”.
We need to see lxc config show <instance> --expanded for one of the affected instances, along with ip a and ip r on the LXD host and inside the affected instance.
We also need confirming whether you can lxc exec into the instance, which shows its running and lxd-agent is working when this happens.
We also need some indication of what triggers it, is LXD process being restarted?
OK next time it happens can you check those things and also the start time of the lxd process on the system as if its not occurring when LXD restarts it is likely to be something different and the linked issue above.