Skip to content

CHR: Installing on VirtualBox

This guide provides detailed instructions for installing Cloud Hosted Router (CHR) on VirtualBox. VirtualBox is a free, open-source hypervisor that runs on Windows, macOS, and Linux hosts.

Before beginning the installation, ensure you have:

  • A host system with 64-bit processor and virtualization support (Intel VT-x or AMD-V)
  • Sufficient system resources (minimum 256MB RAM for CHR, 1024MB recommended)
  • Latest version of VirtualBox installed
  • CHR virtual disk image in VDI format

Download and install the latest version of VirtualBox from the official VirtualBox website. VirtualBox is available for Windows, macOS, and Linux hosts.

Download the Cloud Hosted Router VDI image from the MikroTik download page in the Cloud Hosted Router section. Choose between:

  • Stable: Recommended for production deployments with proven stability
  • Testing: Latest features with potential for bugs
  • Development: Early access to new features under development

Extract the downloaded archive to access the .vdi disk image file.

  1. Open VirtualBox application
  2. Click New to create a new virtual machine
  3. Configure the basic settings:
SettingValue
NameMikroTik_CHR (or your preferred name)
TypeLinux
VersionOther Linux (64-bit)

Always select the 64-bit version to ensure CHR can utilize available RAM and CPU resources efficiently.

Allocate memory for the virtual machine:

RouterOS VersionMinimum RAMRecommended RAM
RouterOS v6256 MB512 MB
RouterOS v7256 MB1024 MB

The formula for calculating minimum RAM is:

# RouterOS v6
RAM = 128 + [ 8 × (CPU_COUNT) × (INTERFACE_COUNT - 1) ]
# RouterOS v7
RAM = 256 + [ 8 × (CPU_COUNT) × (INTERFACE_COUNT - 1) ]

For most deployments, allocate at least 1024MB of RAM for stable operation.

Select the number of virtual CPUs based on your throughput requirements:

  • Single CPU: Sufficient for basic routing and small networks
  • Multiple CPUs: Required for multi-core routing, fast path processing, and higher throughput
  1. Select Use an existing hard disk file
  2. Click the folder icon to browse
  3. Navigate to and select the downloaded CHR .vdi file
  4. Click Choose to attach the disk

Verify all configuration settings before creating the virtual machine:

ComponentRecommended Setting
Memory1024 MB or more
CPUs1-4 depending on workload
DiskCHR VDI image
Boot OrderHard Disk first

Click Finish to create the virtual machine.

  1. Select your newly created VM
  2. Click Settings
  3. Navigate to System tab
  4. Adjust boot order:
    • Move Hard Disk to top position
    • Remove Floppy from boot order
    • Keep Optical if you need to attach ISO images later
  1. Navigate to Processor tab
  2. Select desired number of virtual CPUs
  3. Enable PAE/NX if available (provides access to additional CPU features)

Network adapters are critical for CHR functionality:

Adapter ModeUse Case
NATSimple internet access, default gateway for VM
Bridged AdapterDirect network access, VM appears as separate device
Internal NetworkIsolated network between VMs
Host-OnlyManagement access from host system only

Configure adapter settings:

  1. Navigate to Network tab
  2. Enable Adapter 1
  3. Select appropriate attachment type
  4. Configure advanced options as needed

For production deployments where CHR needs direct network access:

  1. Select Bridged Adapter from the dropdown
  2. Choose the host’s physical network adapter
  3. Verify MAC address if needed

For testing or simple routing scenarios:

  1. Select NAT from the dropdown
  2. CHR will use VirtualBox’s NAT gateway
  3. Configure port forwarding if inbound connections are needed

Review additional settings:

  • Audio: Disable if not needed (CHR does not use audio)
  • USB: Disable if not required
  • Shared Folders: Configure if you need file transfer between host and CHR
  1. Select the CHR virtual machine
  2. Click Start to power on
  3. Observe the boot sequence

The CHR will boot from the VDI image and display the RouterOS login prompt.

Default login credentials:

FieldValue
Usernameadmin
Password(none - leave blank)
RouterOS 7.x
MikroTik login: admin
Password:

Change the default admin password immediately after first login for security.

After logging in, perform basic configuration:

# Set admin password
/user set admin password="your-secure-password"
# View current interfaces
/interface print
# Configure IP address on ether1
/ip address add address=192.168.1.1/24 interface=ether1
# Configure default gateway
/ip route add gateway=192.168.1.254
# Set hostname
/system identity set name="CHR-VirtualBox"

Verify network connectivity:

# Test gateway connectivity
ping 192.168.1.254
# Test internet connectivity
ping 8.8.8.8
# Check resource usage
/system resource print

WinBox connects to routers using TCP port 8291 (the default port). Configure remote management access:

# Enable WinBox on port 8291 (default)
/ip service enable winbox
# Enable API on port 8728
/ip service enable api
# Enable webfig on port 80
/ip service enable www
# Restrict access to management services
/ip service set winbox address=192.168.1.0/24

After initial setup:

  1. Update RouterOS: Check for and install latest updates
  2. Configure NTP: Set time synchronization for license management
  3. Setup DNS: Configure DNS servers for name resolution
  4. Create Backups: Export configuration after testing
  5. Configure Firewall: Secure management access

For optimal CHR performance on VirtualBox:

SettingRecommendation
MemoryAllocate minimum 1024MB
CPUs2+ vCPUs for production
Network AdapterVirtio if available, otherwise Intel PRO/1000
Disk ControllerSATA or IDE (not SCSI for system disk)
VT-x/AMD-VEnable for hardware acceleration

VirtualBox Guest Additions are not required for CHR but can provide:

  • Better mouse integration
  • Shared folders for file transfer
  • Improved video resolution

Monitor CHR resources within VirtualBox:

# View resource usage
/system resource print
# View interface statistics
/interface print detail
# Monitor CPU usage by process (RouterOS v7 syntax; duration in seconds)
/tool/profile duration=3

Issue: Virtual machine fails to start with error about VT-x/AMD-V

Solution:

  • Enable virtualization in host BIOS/UEFI settings
  • Disable hyper-threading if causing conflicts
  • Ensure 64-bit version of CHR is being used

Issue: CHR cannot reach external networks

Solutions:

  • Verify VirtualBox network adapter is attached
  • Check bridged adapter is connected to correct host interface
  • Verify CHR IP configuration and gateway settings
  • Test with NAT adapter mode first

Issue: CHR experiences poor throughput

Solutions:

  • Allocate more RAM to the VM
  • Add additional vCPUs
  • Use Intel PRO/1000 network adapter
  • Ensure hardware virtualization is enabled
  • Reduce VM memory overhead from host applications

Issue: Cannot connect via WinBox, WebFig, or API

Solutions:

  • Verify IP address is configured correctly
  • Check firewall rules on CHR
  • Ensure VirtualBox is not blocking connections
  • Test with ping first to verify IP connectivity
  • Verify services are enabled: /ip service print

Issue: CHR reports low disk space

Solutions:

  • Expand virtual disk size in VirtualBox settings
  • Clean up log files: /log print and clear old entries
  • Remove unused packages: /system package print
  • Consider using RAW disk image for larger allocations