I want to use MaaS to manage some VMs.

(My justification is that I have a project which should use 6 machines, but I only have 4, so for now I want to deploy my workload across 2 VMs, and 4 bare metal.)

I discovered MAAS pods, which are designed for exactly this situation.

I want the VMs to be located on the same machine as the MAAS controller (which is running on bare metal). I added a pod through the MAAS GUI, with address qemu+ssh://falsePockets@localhost/system and the password I use to log in to user falsePockets on the MAAS controller.

The pod was added successfully. Through the MAAS GUI I can successfully add and commission new 'machines' through virsh. ( pods > my pod > Take Action > Compose).

When I manually run virsh list --all, or open Virt Manager, I see the VM which MAAS just created. So MAAS is definitely able to talk to virsh, and has sufficient permissions to create a VM.

Then when it try to deploy (to actually install Ubuntu to the VM), MAAS gets stuck on "Deploying Ubuntu 18.04 LTS", and eventually "Failed deployment". When I open up that VM in Virt Manager and look at the screen, I see that it has failed to PXE boot, and found no bootable installation on the hard drive, so it just sits because it has nothing to boot too.

I have also tried manually creating a VM and PXE booting, to trick MAAS into thinking that a VM is a bare metal machine. That doesn't work. The PXE boot fails. No boot image found.

Additional info

  • I ran sudo su - maas to become the maas user.

    • groups shows that my maas user is in the libvirt group.
    • virsh -c qemu+ssh://opentelco@localhost/system list --all shows the VMs which exist. So MAAS can definitely talk to virsh.
  • I have successfully commissioned and deployed bare metal machines.
  • After the deployment attempt times out, the logs for that (virtual) machine just say "Installation was aborted."

  • I have enabled DHCP by MAAS on the relevant subnet

  • I have disabled DHCP by Virsh with virsh net-edit default, and deleting the <dhcp> element. ( I tried before and after this)

  • I have tried manually rebooting the VMs with virt manager, to trigger a PXE boot. That didn't work. No PXE boot source found.
  • this may be a duplicate question. However that question is a bit unclear. There's insufficient detail and it's unclear what 'enlist' means.
  • the VM's network connection is a NAT to the default virsh network. (That's what MAAS configured it to be)
  • I'm having the exact same issue on a new install of MAAS. The default bridge configuration seems to not allow DHCP/PXE traffic to the VM and the documentation doesn't mention anything about how to do it. – Shawn Weeks Jul 31 at 5:23
  • I would look at iptables to check if those VMs are allowed to access DHCP server. You need to have rules for that particular bridge incoming connections, it is treated as outside network. – marosg Jul 31 at 8:17
  • something like this ``` sudo iptables -t nat -A POSTROUTING -s ! -d -m comment --comment "network maasbr0" -j MASQUERADE sudo iptables -t filter -A INPUT -i maasbr0 -p tcp -m tcp --dport 53 -m comment --comment "network maasbr0" -j ACCEPT sudo iptables -t filter -A INPUT -i maasbr0 -p udp -m udp --dport 53 -m comment --comment "network maasbr0" -j ACCEPT sudo iptables -t filter -A FORWARD -o maasbr0 -m comment --comment "network maasbr0" -j ACCEPT sudo iptables -t filter -A FORWARD -i maasbr0 -m comment --comment "network maasbr0" -j ACCEPT ``` – marosg Jul 31 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.