This is a Vagrantfile and documentation for ktogias/mikrotik MikroTik RouterOS Vagrant Box (https://app.vagrantup.com/ktogias/boxes/mikrotik).
The box and Vagrantfile currently only support libvirt provider.
The box was created on a Fedora 39 machine with libvirt, virt-manager, vagrant and vagrant-libvirt installed.
I downloaded the RouterOS 7.13 x86 iso from https://mikrotik.com/download and created a new vm with virt-manager with installation from the downloaded iso. I checked "Customize configuration before install" and changed disk bus to "SATA". RouterOS will not install on a VirtIO disk.
After installation I run the commands in setup.sh script:
ip dhcp-client add interface=ether1 disabled=no
tool fetch url="https://raw.githubusercontent.com/ktogias/mikrotik-vagrant-box/master/setup.sh" mode=https dst-path="setup.sh"
system script add name=setup source=[/file get setup.sh contents];
system script run setup
and shut down the vm with system shutdown.
Then I used create_box.sh script to create the box.
- Install vagrant and vagrant-libvirt
- Clone this repo:
git clone https://github.com/ktogias/mikrotik-vagrant-box.git cd mikrotik-vagrant-boxvagrant upto start the RouterOS vmvagrant sshto ssh into the RouterOS vmvargrant destroyto stop and remove the RouterOS vm
Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA