Hi @ben-ihelputech, I was able to deploy a LXD host manually and connect it to MaaS without issue.
My ‘rough’ process was this:
- In MaaS, deploy Ubuntu 20.04 on a physical server utilizing bridge interfaces to the networks you wish your VM’s to connect to.
- SSH into the server, issue:
sudo apt update && sudo apt upgrade
sudo apt-get purge -y *lxd* *lxc*
sudo apt-get autoremove -y
sudo snap install lxd
sudo snap refresh lxd --channel=5.6/stable
# When I issued install lxd, it installed version 4.0.9; branch - 4.0/stable, so I had to do a refresh to get the latest.
sudo lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: yes
What IP address or DNS name should be used to reach this node? [default=<REDACTED>]:
Are you joining an existing cluster? (yes/no) [default=no]:
What name should be used to identify this node in the cluster? [default=<SERVER NAME>]:
Setup password authentication on the cluster? (yes/no) [default=no]:
Do you want to configure a new local storage pool? (yes/no) [default=yes]:
Name of the storage backend to use (dir, lvm, zfs, btrfs) [default=zfs]: dir
Do you want to configure a new remote storage pool? (yes/no) [default=no]:
Would you like to connect to a MAAS server? (yes/no) [default=no]: yes
What's the name of this host in MAAS? [default=<SERVER NAME>]:
URL of your MAAS server (e.g. http://1.2.3.4:5240/MAAS): http://<MASS IP>:5240/MAAS
API key for your MAAS server: <REDACTED>
Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]: yes
Name of the existing bridge or host interface: br0
Is this interface connected to your MAAS server? (yes/no) [default=yes]:
MAAS IPv4 subnet name for this interface (empty for no subnet): <SUBNET>/24
MAAS IPv6 subnet name for this interface (empty for no subnet):
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
- Once finished, I logged into MaaS, KVM tab, ‘Add LXD Host’. This gave me a LXD key to trust and respective command to issue (copy/paste from gui to server):
lxc config trust add - <<EOF ....
Once issued on the physical server, the host was successfully added to MaaS and so far, I was able to virtualize resources on MaaS, commission & deploy VMs without issues so far.