Setting ip address of cloud-config-url in MAAS

2k Views Asked by At

I'm trying to set up a group of VM's using MAAS with vagrant and virtualbox using a host only network shared between the VMs. I'm trying to get the node VMs to use PXE to install the operating system. I've got the node VMs to start PXE booting by setting up DHCP on the controller VM and forcing the node VM to boot from the second nic. The installation gets part of the way through before stopping when cloud-init tries to download the config. My Vagrant file is at https://gist.github.com/pj/3db0fe2e87cf35d4f6ffb37a5b5b8bb6.

As far as I can tell, MAAS is delivering the address to cloud-init through the cloud-config-url boot parameter. From looking at the output when the PXE node tries to boot I can see that the address being delivered contains the ip address of the NAT nic that Vagrant automatically creates for VMs, not the ip address of the host-only network which was used for DHCP and to deliver the PXE boot files.

Is there a way to change the ip of the cloud-config-url boot parameter? In the MAAS source it seems like this is derived from some part of the RackController config, but I couldn't trace where it was set from.

2

There are 2 best solutions below

0
On

Okay figured it out, I needed to set the url for the rack and region controller using the following commands:

    sudo maas-region local_config_set --maas-url="http://192.168.50.2:5240/MAAS"
    sudo maas-rack config --region-url="http://192.168.50.2:5240/MAAS"
0
On

In our setup, instead of forcing slave nodes (the one that PXE-booted and managed by MAAS controler) to use host-network IP as shown above, we have made the MAAS controller a router for its managing subnet. This is a more robust configuration and closer to an actual environment.

From what we have seen, these nodes, once PXE-booted, need internet access in order to load more packages on top of OS. Otherwise, they can be in an intermediate state and never finish "deploy" until a timeout error.