Copyright @ Lenovo US
After setting up the MAAS server and its subnet, bringing up a target node is simple.
All nodes must be on the same 192.168.8.0/24 subnet, and they must support PXE boot.
The MAAS machine functions as both the DHCP server and the TFTP server, both are required to facilitate PXE booting. First, we creat a blank VM. The important things are:
Under System → Mother board → Boot order, check the Network. However, it is not necessary to move the Network boot above Hard Disk. When there is no OS deployed yet on the hard disk, boot process will fall through to PXE anyway. Once an OS has been installed, the machine will boot normally from HD.
If you put PXE as the first order, this target will not boot into HD image at all.
Set Network → Adapter 1 → Internal Network, named intnet. This corresponds to the MAAS managed subnet of 192.168.8.0/24.
After this, start the target VM and it should PXE boot and will shut itself down at the end of the boot.
MAAS machine life cycle
MAAS target goes through a life cycel as shown below:
Once PXE booted, the MAAS server will automatically enlist this machine with a New status. This indicates that machine has been discovered by MAAS. The given node name is completly arbitrary, and it has nothing to do with VM's name.
If there are multiple targets, the only way to match MAAS node name with a VM is through assigned IP addresses.
This is the phase in which MAAS server tries to determine the CPU, memory, and disk information of the target. Two important configurations to notice:
- Power type: for our virtual lab, select Manual. Otherwise, the admin GUI will block you from commissioning completly.
Retain: do NOT check such checkboxes. The word retain means to keep what you have. Therefore, it will skip registering the target's disk information. This is super confusing because commission output details will show clearly the disk info. So the commission scripts run just fine and pulled everything correctly. It's the MAAS logic to ignore these returned values if user has checked retain.
If commissioning went through, MAAS server will now has all the information needed to deploy something to this target. Think of machines in this state as a pool from which deployment can pick.
By far, target machine has nothing on it — it has a blank disk. First thing first, we need to put an OS on it, and that's deploy is about.
- Take action → Deploy, and reboot target which should come up in PXE again.
- MAAS admin will automatically change node's status to Deploying.
- OS will be written to disk.
Once state switched to Deployed, verify by:
- Goto Subnet menu on MAAS web admin UI, look up the target's assigned IP address.
Boot up target machine ← it will now load from HD instead of PXE!
```shell ssh firstname.lastname@example.org ```
Since deployed image has copied the SSH public key that we have created in steps of creating the MAAS server itself and have copied to the MAAS admin UI, you can now SSH to any deployed target without having a password.
Releasing a deployed target gives an option to erase disk. Again, taget has to be PXE-booted in order to be managed by the MAAS server.
MAAS sever can not manage a deployed target unless it PXE boots.
If released and disk erased, the node becomes READY, again.
— by Feng Xia