Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mikrotik/routeros/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apt-get update -qy \
python3-ipy \
socat \
qemu-kvm \
qemu-system-x86 \
tcpdump \
ssh \
inetutils-ping \
Expand Down
7 changes: 6 additions & 1 deletion mikrotik/routeros/docker/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import ftplib
import logging
import os
import platform
import re
import signal
import sys
Expand Down Expand Up @@ -52,7 +53,11 @@ def __init__(self, hostname, username, password, conn_mode):
for e in os.listdir("/"):
if re.search(".vmdk$", e):
disk_image = "/" + e
super(ROS_vm, self).__init__(username, password, disk_image=disk_image, ram=256)

# the default cpu=host only works when running clab on an amd64 machine
extra_args = {} if platform.machine() == "x86_64" else {"cpu": "qemu64"}

super(ROS_vm, self).__init__(username, password, disk_image=disk_image, ram=256, **extra_args)
self.qemu_args.extend(["-boot", "n"])
self.hostname = hostname
self.conn_mode = conn_mode
Expand Down