Notice
First of all, If you want to use lxd along with maas.
Please check dnsmasq conflict between maas and lxd.
especially when I wanted to use zaza test. I faced this issue.
Setting Host
Configuring Virtual MAAS in one machine makes that you are able to test some kind of openstack env or kubernetes env with juju & charm.
This post mentions that how to set up virtual maas in one machine.
- OS: Ubuntu 20.04 Focal
- Hypervisor: VMware Workstation
First, you need to install qemu-kvm, libvirt and related pkgs.
Check if nested kvm is working.
Add root to libvirt and kvm
Let’s set host conf
You may need to set user and group in /etc/libvirt/qemu.conf to root
Let’s create network for virtual maas, in this case, it is maas-mgmt, maas-private
Stop default network
Save below file as maas-mgmt.xml
Then define it. and start.
Save below file as maas-private.xml
Then define it. and start.
Preparing storage for vms
Preparing xml file for juju controller
// some parameters should be adjusted to your env.
// juju controller needs at least 3584.0MB for memory
Install MAAS
Install MAAS
Waiting on MAAS image synchronization.
Then you need to add this host as Chassis on MAAS.
You also need to set DHCP for network subnet. Otherwise, you can’t let machine boot by PXE
Then this machine needs Commission first.
Install Juju
Install Juju
How to use MAAS with Juju
When you add credential, there is a part for maas-oauth. then you need to copy below key and paste it to there.
juju bootstrapping