Score:0

Homelab with Maas and LXD

ae flag

I have installed maas as recommended here: https://www.youtube.com/watch?v=sLADei_c9Qg https://github.com/antongisli/maas-baremetal-k8s-tutorial/blob/main/maas-setup.sh

The host ip address is 10.0.0.2. Fabric-1 uses range 10.10.10.0/24.

When I create LXD VMs using maas admin, ips are taken from range 10.10.10.0/24. I would like to access VMs from my local network and consequently use ip range 10.0.0.100/24.

I have tried to create a bridge interface between fabric-0 and fabric-1 and associate a macvlan profile to LXD project maas but w/o any success.

What should I do?

Score:0
by flag

if what you want to do is expose services that you have inside the LXD VMs, there are a few ways:

  1. you can use iptables and do port forwarding (there is an example in the tutorial for exposing the k8s test application. If not using K8s, the same technique would work for any service running on a LXD guest)
  2. you can check out metalLB for k8s

I'd recommend either of the options above rather than trying to do what you're doing - because what you are trying to do might cause problems with DHCP. One of the reasons I used a separate bridge network was to let MAAS have complete control over DHCP in that L2 domain. If you try to connect your home or lab network with the bridge, you might end up having two DHCP servers competing.

An alternative is if you have a switch which is VLAN capable, then in that case I would suggest you just make a separate VLAN and put MAAS and any LXD hosts inside it. Then all you need is a router (with DHCP disabled), and configure MAAS to set the gateway to be the router. This is actually the exact same setup built by the tutorial, except in the tutorial it was virtual (and had to rely on NAT).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.