Vm created by lxd not using correct NIC as device parent when using bond

I’m having trouble spawning pods from my vmhosts with lxd enabled.

The host is configured using maas, and created a bond device that consumes the other two eth0 and eht1.

After registered the host as a vmhost in MAAS, the following happens:

  1. If not specifying network devices for the vm, it uses eth0 as the nic parent in the generated lxc config, therefore the vm is unable to be pxe booted by the maas controller through the tagged vlan.
  2. If add new and select the fabric with vlan tagged, it sometimes create the correct config, sometimes it’s having no internet devices in the created vm

Additionally, sometimes when clicking the refreshing button on the vmhost tab, the host will get listed as one of the pods it created. Clicking it for the second time will makes all existing pods disapear, and clicking it several times after, all nodes are appearing in the correct postion. This one might be a UI bug, but not sure if it’s involves in the vm creating process.

That sounds like a bug. But could you also try to create a bridge with the bond in it? Then the VM should use the bridge as the parent device.

Do you mean something as follows?

  1. lxc network create bond-br0 --type macvlan parent=bond0
  2. select it when creating the pod

I’ve done similar and it works. But the generated lxc config is the same when clicking the 2. path in my question above.

@extraymond, did you ever figure this out?

Unfortunately not.
I disabled the bond mode for now.

sigh @extraymond, i know it’s been a while, but you wanna file a bug so we can take a closer look? some things are just hard