How to create a template to run in LXD i.e. VyOS, or FreePBX?


Hello all,

I have my LXC/LXD environment running different containers and everything is good. However, if I want to run a FreePBX system or some other ISO distro, VyOS router. What will be the best way to create a template that can be run just as the LXD images available?

Any feedback or suggestion will be really appreciated.

Thank you,

This is just a guess but with LXD v 3.0.0 there is a new tool called lxd-p2c which will convert a physical machine or a VM to an LXD container. Read through this thread to learn more about it:

My thought was perhaps you could create a VM with Vyos or FreePBX then use lxd-p2c to create your initial LXD container.

You may still have quite a bit of configuration to do regarding networking interfaces (vyos) or whatever devices FreePBX might use but at least you would have a starting place. If you can get everything working in the initial container you can then always copy that container either local or remotely to replicate?

With FreePBX this thread on the FreePBX forum seems to indicate that it at least worked okay
in a “privileged” container but from the thread discussion it sounded like the OP of that thread didn’t have a lot of experience with lxc yet so perhaps it would work in an “unprivileged” container also?

1 Like

Hello there,

Thank you very much for the information. I guess I can try this way. I will check the tool… Actually the FreePBX machine I am currently running it’s a VM in top of a physical ubuntu server.

If the tool can convert the KVM virtual machine to an LXC then the rest will be to configure the network bridge etc.

Let’s see how this goes. Thank you again!


Other alternative to Vyos you might look at is FRR (Free Range Routing):

which was a Fork of the Quagga routing project. Most of the top Quagga developers migrated to FRR when the fork occurred.

FRR is a Linux Foundation hosted Project and supports OSPF, BGPv4, BGPv6, ISIS, RIP and LDP.

Martin Winter, co-founder of the non-profit Network Device Education Foundation (NetDef), who is involved with FRR, said “I believe it [FRR] fills a hole. There wasn’t a routing stack under the Linux Foundation at all.”

FRR was a fork of the Quagga project, which is also an open-source routing protocol project, as Winter described in 2014 when SDxCentral spoke with him. Quagga offered an open source routing alternative to the proprietary offerings of the big routing vendors. It has been around for quite some time — about 12 years. But in mid-2016, some members of Quagga forked the project to create FRR.

“FRR started because we wanted a different development model,” said Winter. “Quagga was challenged to get things in in a timely manner. It couldn’t catch up with the contributions. We wanted to change the process to have better testing, a better-responding community. That’s why we put it on the Linux Foundation.”

Nearly all the main contributors of Quagga have moved to FRR, according to Winter, although Quagga does still exist.

FRR has been getting alot of attention in the industry and companies like Cumulus Linux, BigSwitch Networks etc are already using it for white box routers & and router/switches.

1 Like

Can’t thank you enough. I will definitely look into it, I am wondering what your thoughts are about BIRD we started testing it but still we are seeing issues with it and Ubuntu, but that is another topic forum (^^)

Again, thank you and will definitely check FRR out.


VyOS is firewall which includes old Quagga

FRR is a fork of Quagga but its just a routing daemon on its own, not a firewall.

If your looking at routing Daemons then also look at Bird which has things like BFD which FRR doesn’t have yet…

1 Like

Opnsense also runs FRR if you want a nice GUI Firewall with a decent routing daemon.

1 Like