Some time ago, I built a tiny data center using old 2012 MacMinis and MAAS. It took a lot of steps and effort to succeed, but in the end, all the computers were successfully provisioned. As a next step, let's try to deploy a Virtual Machine on that metal.
When navigating to Machines, there is a list of all the machines that include bare metal as well as virtual ones.
We will use vital-ant.maas
to deploy a new Virtual Machine. Before deploying the VM, it is worth mentioning that we can overcommit bare metal. This is useful when you are deploying VMs that are most of the time idle. To adjust those setting one has to go to KVM and pick Virsh.
Then, clicking vital-ant
brings the settings screen.
The machine is overcommitted by a factor of 2 in the case of CPU as well as memory. Save the changes and compose a new virtual machine.
We have to click Take action and pick Compose. This in turn brings up a screen for configuring the machine, so we can provide:
name for the machine,
domain,
zone,
resource pool,
architecture,
amount of RAM,
number of CPU cores,
storage,
network interfaces.
Once we hit Compose machine the process begins.
We can now see that a new machine is present on the list. Status shows what's actively going on with the created machine.
After a while, the machine becomes Ready. At this point, we can start deploying the Ubuntu image.
Clicking Take action and then Deploy brings us up to the deployment setting screen.
After choosing Release and Kernel, we hit Start deployment for the machine. We have to wait a while for the process to complete. Upon completion, test.maas
is listed with a status containing information about the deployed image, and in our case, it is Ubuntu 20.02 LTS.
Now, we can ssh
to the machine to check connectivity.
❯ ssh test.maas
The authenticity of host 'test.maas (192.168.111.69)' can't be established.
ED25519 key fingerprint is SHA256:AqQxuoD6Y1Lc4gb7ghYmwgY63LRK3C3ikoaL7xYqUrc.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'test.maas' (ED25519) to the list of known hosts.
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-135-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Wed Dec 28 13:43:07 UTC 2022
System load: 0.0 Processes: 114
Usage of /: 9.5% of 45.53GB Users logged in: 0
Memory usage: 10% IPv4 address for ens4: 192.168.111.69
Swap usage: 0%
0 updates can be applied immediately.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
That's it, you created your first VM! I hope that you liked it! This is exactly how I started experimenting with Kubernetes - creating several VMs and installing a cluster on them. It soon turned out that once I corrupt the cluster, I have to repeat all the steps again and again ... and again. It became cumbersome and boring. Fortunately, this can be automated with terraform and ansible. We will discuss them next. Stay tuned!