Good day, Habr!
All have already seen, and successfully use such an emulator as GNS3, which represents great opportunities for beginners who want to deal with this or that equipment, but do not have physical access to it. Or try to implement some kind of combat scheme, debug, check, and then send it to production.

')
Recently, on Habré appear interesting articles on working with equipment Mikrotik. Not everything can be tried on real hardware, so I had a question - is it possible to emulate it too? As it turned out, Mikrotik itself is not lagging behind in this matter, and invites us to try ...
For network emulation we are offered -
GNS3For hardware simulation -
QemuAnd the image of RouterOS for x86 systems -
RouterOS1. First, we need to prepare an image of a virtual hard disk, which later we will install RouterOS. To do this, you must use the
qemu-img utility.qemu-img create [-f format] filename [size]
It will be enough for us to create a simple image in qcow2 format in the size of 1G
Qcow2 is a QEMU disk image format. The name is an abbreviation of the name of the Copy-On-Write format (copy on write).
To do this, run the command
qemu-img.exe create -f qcow2 mikrotik.img 1G
* The image is created in the current folder. For convenience, after installing the OS, it should be moved to the folder with the GNS3 project, or to any other place convenient for you2. Next, you need to install RouterOS on our virtual hard disk image.
For this we use the
qemu utility.
qemu [option][disk_image]
There are many options for the utility, we need:
-boot [a | c | d | n]Boot on floppy (a), hard disk (c), CD-ROM (d), or Etherboot (n). Hard disk boot is the default.-cdrom fileUse file as CD-ROM image (you can't use -hdc and -cdrom at the same time). You can use the host CD-ROM by using / dev / cdrom as filename.qemu.exe mikrotik.img -boot d -cdrom <__>/mikrotik.iso
The qemu interface will start, and if everything is completed successfully, we will see an invitation to select the necessary components. Click
“i” to install.
3. Now we need to add our new device to GNS3 itself.
Go to
Edit → Symbol ManagerAdd the icon of the router, add the name Mikrotik (Name) to it, and select the type Quemu guest. Do not forget to click Apply to save the changes.

4. We also need to connect our hard disk image.
Go to Edit → Preferences → Qemu
Select the name, path to the image, the amount of memory, the number and type of network interface.
Click Save.

That's all. Our "stand" is ready for battle.

Have a good learning!