Chapter 3: Composing the Virtual Machine
Building virtual host systems directly into hypervisor frameworks.Instead of manually partitioning nodes via physical hardware access, we deploy virtual machines directly through hypervisor targets managed inside our CLI array.
1. Binding the Hypervisor Host
We register our system LXD backend interface as a recognizable VM-Host collection object inside the regional engine. We map the precise system secure port address running locally:
maas admin vm-hosts create type=lxd power_address=https://10.38.31.1:8443
The system returns a structured response string including our core deployment resource index:
"resource_uri": "/MAAS/api/2.0/pods/7/"
2. Composing the Node Machine
Using our host index target identifier (7), we slice out an isolated virtual environment instance on-the-fly:
maas admin vm-host compose 7
The hypervisor allocation succeeds and outputs a unique system tracking tag identifier:
{
"system_id": "xttpfx",
"resource_uri": "/MAAS/api/2.0/machines/xttpfx/"
}
3. Monitoring Commission Status
We trace the newly generated block parameters by running an optimized JSON layout filter via `jq`:
maas admin machines read | jq -r '(["HOSTNAME","SYSID","POWER","STATUS"] | (., map(length*"-"))),(.[] | [.hostname, .system_id, .power_state, .status_name]) | @tsv' | column -t
Our virtual node boots successfully, passes active diagnostics, and cycles safely into a structured Ready configuration state.