VyOS in lxd/lxc container?


#1

Has anybody run VyOS in lxd or lxc containers?

I want to set up a lab with a large number of routers (40-50) and I’d rather not run each one as a separate VM.

The underlying issues seem to be:

  • Does VyOS customise the kernel, or can it run on a recent stock kernel? (e.g. 4.4.0 which comes with Ubuntu 16.04 - convenient platform for lxd)

  • Can I create a “flattened” filesystem image which I can turn into an lxd image, rather than booting from ramdisk?

It seems it ought to be possible, given that VyOS is Debian-based, but I’d like to know how feasible this is or if anyone has tried it before.

Thanks, Brian.


#2

It works :slight_smile:
Things like setting the duplex and link speed of ethernet interfaces fail, and there seems to be no way to remove these from the config (I tried both manually removing from config.boot / delete int eth eth0 duplex auto but they just keep re-appearing)
If you can ignore those errors when committing ethernet interface configuration the basic functionality seems ok. I haven’t tried any exotic configurations so YMMV.


#3

Great! Would you mind sharing how you did it? Did you somehow unpack the ISO inside an lxd container, or build VyOS from source inside a container, or …?


#4

Great! Would you mind sharing how you did it? Did you somehow unpack the ISO inside an lxd container, or build VyOS from source inside a container, or …?