Setting up a VM using MAAS

Hi All,

I am new to MAAS and installed MAAS snap in an ubuntu server VM using POC configurations and able to detect physical servers in my rack. I did read in MAAS documentation that if a VM booted using Network PXE then MAAS should be able to install OS on it.

I tried using below setup and MAAS VM is able to discover the VM2 when it boots up in network PXE mode

But it is just in discover mode under MAAS UI but not under Machines Tab. Ideally it should be detected under Machines section so that we can start commissioning process. Right ?

In VM2 it waits for a while in Network PXE boot format and then exits as shown below

Am I missing any steps here ?

Hi @codingfreak, how many NIC do you have on the VM? What MAAS version are you using?

Well my host machine had multiple nice cards (around 4) but I only have 1 active nic card. As shown in picture it is mapped to br0 (bridge interface). Each VM had only one nic card which is connected to the br0.

With respect to MAAS version installed

$ snap info maas | grep installed
installed: 3.3.4-13189-g.f88272d1e (28521) 138MB -

Have you configured MAAS DHCP on the subnet?

I am sorry for the late reply.

Well I havent enabled the DHCP option under MAAS as i got a separate DHCP server.

MAAS DHCP is a key element for MAAS, you can’t make it work without it :slight_smile: You can read more about MAAS DHCP here

Anyways, if you have to use an external DHCP server you’ll need some tricks in order to make it work. But it’s not a supported scenario

Thanks for the reply @r00ta

I understand it is not a supported case, but is there any article which talks about the tricks to be done in the case of external DHCP server scenario?

I’m sorry for the bad news, but afaik given that it’s not supported there are no official guides about it: you might get it to work, but there might be (or will be!) dragons around as well.

So the only option I have is to create a private network with DHCP enabled in MAAS to test working of MAAS then.

You can make it work with an external DHCP server just fine.
All you need to do is set two DHCP options to specify the TFTP boot server and image file, pointing to MAAS.

Just be aware that you’re hardcoding the imagefile, so you can only support 1 boot architecture (BIOS vs UEFI) at a time this way.

Here’s mine for UEFI:

Screenshot 2023-08-23 at 20.18.12

Also, make sure you configure the VM to always boot from the NIC first, otherwise you will have problems releasing & re-using the node once it has been deployed with an OS once.

1 Like

Thanks for the reply @kevin-reeuwijk

So I need to modify the external DHCP server configuration to include respective DHCP options namely TFTP boot server and Image file path point to MAAS. Where can I get the links for the same in MAAS ?

Also if I have 2 different machines using different OS namely ubuntu-server and custom-OS … where can I explicit mention in MAAS that this machine needs to boot up with respective OS flavor ?

@codingfreak
TFTP Boot Server should be the IP address of your MAAS server.
TFTP Boot File should be either “bootx64.efi” for x86_64 UEFI or “lpxelinux.0” for x86_64 legacy BIOS.

You can find all possible boot files at /var/snap/maas/common/maas/boot-resources/current on the MAAS server.

The boot file doesn’t determine the boot OS, MAAS takes care of all that. So you don’t need different boot files for different OS’es.