Quick writeup on installing Mikrotik CHR on Proxmox with ZFS

ndroftheline

Active Member
Jun 17, 2017
33
12
28
35
Hey all, I just wanted to share a quick writeup on how to set up a CHR VM on Proxmox with ZFS. Didn't find it in the forums when I was searching so in case someone else needs to, they can use this.

setting up a CHR VM on proxmox with zfs
  1. download and unpack the CHR RAW img (https://mikrotik.com/download , find "Raw disk image") to somewhere you can access from your proxmox host
  2. create a new VM, preconfigured for linux 2.6+, with virtio block device storage, and at least two virtio network interfaces, one connected to uplink, the other either disconnected or connected to the downstream switch, 1 core, 256mb is fine. no need to start the VM yet, just create it.
    1. note the VM's number id. i'll be using 139 in this example.
  3. find the location on the local filesystem for the VM's disk:
    1. pvesm list <poolname> | grep <vmid> e.g., pvesm list mkx-mass | grep 139
      1. that will tell you the name of the disks attached to the VM
    2. pvesm path <storage>:<vm-disk-name> e.g. pvesm path mkx-mass:vm-139-disk-0
      1. that will tell you the full local path of the raw virtual disk
  4. copy the raw image to the raw virtual disk dd if=/path/to/chr/img of=/full/local/path/raw/virtual/disk e.g., dd if=/mnt/pve/foinix-proxmox-content/template/iso/chr-6.45.8.img of=/dev/zvol/mass/vm-139-disk-0
    1. that will dd the contents of the raw image onto the raw zvol disk of the virtual machine.
done. start the VM.
 
  • Like
Reactions: Rares

Rares

Active Member
Feb 28, 2017
66
5
28
Hi @ndroftheline,

Thank you for the tutorial. Here are some questions if I may:

Can you tell me what routing speeds did you manage to get using the VM? What are your server specs?
Is the 60 days license full features?
Did you manage to export the config from a hardware Mikrotik and import it in the VM so that you created a "backup" device?
Does Mikrotik have a failover mechanis to switch from the real device to the VM device?

Thank you,
Rares
 

ndroftheline

Active Member
Jun 17, 2017
33
12
28
35
I only set this up for a special type of VPN I needed. I haven't tested routing speeds, and probably won't, so I doubt my server specs matter (It's an old Mac Pro cheesegrater)
Yes, the 60 days license is fully featured, you can specify the license you trial (p1, p10, P-Unlimited). Details are availablein Mikrotik's documentation: https://wiki.mikrotik.com/wiki/Manual:CHR#CHR_Licensing
No, I haven't tried to export and import configs.
I don't know about failover the way you describe. I achieve failover between a few hardware routers in my unusual configuration using route distances. When a route goes down it switches to the next lowest routing distance. I can manually change routes by modifying the route distance. Most of those kinds of questions would be better answered on Mikrotik's forums though, to be honest - I'm not personally a Mikrotik expert, a network engineer coworker set up the network I'm on.

The nice thing about Mikrotik is that if your trial runs out, it'll default to their totally free of cost license, which has all features enabled but limits uplink speed to 1mbps - obviously not usable in real life, but great for testing things like failover. And with a virtual one in Proxmox you can fiddle to your heart's content, and hopefully document your progress somewhere public :D

GL HF
 

atari

Member
Mar 4, 2016
16
0
21
48
Did anybody success converting Mikrotik VMware image to proxmox? I try but get licence error, I copy uuid, 2 disk
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!