MAAS with lxd-vmhosts, wrong parent NIC chosen

I’m having trouble bootstraping a MAAS backed juju cloud.

I have one machine listed under MAAS and register it as the LXD-vmhosts.

The MAAS node have the following network interfaces:

  • NIC1
  • NIC2
  • bond(NIC1+NIC2)

While juju can connect to my MAAS controller, the bootstrap process calls the vmhost to prepare a vm for it to use, and unfortunately, lxd config it created for this new vm had my NIC1 as the eth0 parent, therefore MAAS was not able to PXE boot the device and control it, since it should have been through macvlan via the bond NIC.

Is there any way I can specifically tells juju to tell MAAS to prepare machines with bond0 as the default NIC? Thanks.

Currently, I can prepare the machines beforehand using the vm GUI on MAAS, and I can therefore use tag to tell juju to bootstrap on the nodes tagged, but it’s a lot verbose than I would like it to be. And I don’t think this will scale well if I’m trying to scale applications alongside it.

I think you need to bridge the bond, creating br-bond for example, then change the LXD profile you’re using (potentially the default) to use that bridge as the network for LXD devices.

So the profile looks something like this:

config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    network: br-bond
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default

Perhaps @stgraber can elaborate.

I tried, but the vmhost didn’t use my default profile to create new vm’s, because the default it it either didn’t use the lxdbr0 in default, or use my edited bridge that uses bond0 as parent.

The one created in the profile will always be a macvlan device which is expected because it needs the MAAS controller to configure the machine, the problem is the order of the parent device in the created config was using my first NIC device instead of using the bond. And this could be change if I add the create new NIC tab in MAAS. So MAAS indeed have the ability to use that device, just the default was unexpected.