DHCP-BOOTP PXE not working

Hi!

I created a VLAN and a QEMU bridged network, both work fine but when I create a VM in the KVM pod, DHCP is not giving any address and is not pxe-booting.

Any ideas what could be wrong?

Cheers,

Versions:

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

MAAS Version 2.4.2

This is what I get on dhcpdump:

---------------------------------------------------------------------------

  TIME: 2019-03-21 19:17:29.582
    IP: 172.16.100.1 (32:82:39:3:ac:15) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: 2a28aa62
  SECS: 8
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 32:82:39:03:ac:15:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
OPTION:  61 ( 23) Client-identifier         00:4d:41:41:53:2d:33:32:3a:38:32:3a:33:39:3a:30:33:3a:61:63:3a:31:35
OPTION:  55 (  3) Parameter Request List      3 (Routers)
                                              1 (Subnet mask)
                                              6 (DNS server)

---------------------------------------------------------------------------

If you are turning DHCP on a bridge interface created by virsh (aka. virbrX) then you need to be sure that you have the DHCP server turned off on that network defined in virsh.

If you do not do this then virsh will run its own DHCP server instead of MAAS and MAAS will not be able to provide the DHCP addresses or the next-server DHCP options for the VM to PXE boot.

Ooohh ok got you, yes, the bridge is used by Libvirt, but as a bridged network, DHCP sis disabled there:

<network>
        <name>VMNetwork0</name>
        <forward mode='bridge'/>
        <bridge name='vmnw0'/>
</network>

Right now we had to use an external DHCP, but I’d like to insist on MAAS being the DHCP server.

Thanks a lot!

Try disabling STP on the vmnw0 interface. I have seen issues where STP causes the virtual bridge to not work with DHCP, mainly when the DHCP server is on the same host that has the bridge.