Mikrotik Cloud Hosted Router and network provision

Hello!

I’m using Mikrotik CHR as gateway routers for virtual networks in my OpenNebula installation. As CHR doesn’t support ISO mounting, I can’t use the default way to provide necessary info and forced to manually configure router for the first time via console. Of course, this is a bad thing, and I would prefer to automate this.

Are there other ways to have this task accomplished?

Thanks!

1 Like

It actually doesn’t matter if you are able or not to mount an ISO if you can’t install the context package. I might be wrong here but I think you won’t be able to install that package because of the RouterOS you are using.

Thanks for pointing, it’s pretty obvious that there is no context package for RouterOS available. :slight_smile:

But OS has scripting capability so I can write my own provisioning script if VM can access context data in other way than through mounted context ISO.

Hello, in addon-lxdone there is a custom context package, addon-context-linux-lxd. Basically what we do is exploit the container capability of injecting files in the deploy script using the isoparser python package, we also had issues with iso files and container mounts.

If you cannot mount isos, you can follow a similar approach with KVM, but instead of injecting a file you coud put the iso in a tiny raw image and pass that image to the VM as a disk and mount it on /mnt. However you would have to hack both the deploy script and the contextualization software, what we changed is the contextd script

2 Likes