Virtual Machine

This Section will show you how to convert, install and run an Image as a Virtual Machine.

A virtual machine can be used to try out Motorcortex on your PC. You will need a the Motorcortex .ova file as well as VirtualBox installed on your PC.

Installing VirtualBox

In this section you will install VirtualBox for running your Motorcortex virtual machine.

Please select the OS you are using:


This guide covers setting up and running a QEMU virtual machine on Ubuntu with TAP networking, UEFI firmware, and KVM acceleration.


Table of Contents

  1. Prerequisites
  2. Installation
  3. Understanding the Command

Prerequisites

System Requirements

  • Ubuntu 20.04 or later (tested on 22.04/24.04)
  • CPU with virtualization support (Intel VT-x or AMD-V)
  • At least 8GB RAM (4GB will be allocated to VM)
  • Sufficient disk space for VM image
  • Download the MCX-RTOS image here: https://app.motorcortex.io/store/items

Check Virtualization Support

# Check if virtualization is enabled
egrep -c '(vmx|svm)' /proc/cpuinfo

# If output is greater than 0, virtualization is supported
# Also check:
kvm-ok

# Expected output: "INFO: /dev/kvm exists"

Installation

Install Qemu

# Update package list
sudo apt update

# Install QEMU, KVM, and OVMF (UEFI firmware)
sudo apt install -y qemu-system-x86 qemu-kvm ovmf bridge-utils net-tools

Setup some scripts

Download the following scripts:

Place the scripts in the same folder as your downloaded MCX_RTOS image.

NOTE: You may have to modify the name of the image file inside the start-qemu-mcx-image.sh script.

Make the start script executable:

chmod +x start-qemu-mcx-image.sh

Running

./start-qemu-mcx-image.sh

Understanding the Command

Let’s break down each component of the QEMU command:

sudo qemu-system-x86_64 -drive file=mcx-image-mcx-intel.rootfs-2026.05.1-0-g34c0e28-20260508091432.wic,format=raw,if=virtio \
  -m 4090 -bios /usr/share/ovmf/OVMF.fd \
  -cpu Skylake-Client \
  -smp cores=4 \
  -enable-kvm \
  -netdev tap,id=net0,ifname=tap0,script=network-up.sh,downscript=network-down.sh \
  -device virtio-net-pci,netdev=net0 

Command Parameters Explained:

Parameter Description
sudo Required for TAP networking and device access
qemu-system-x86_64 QEMU emulator for x86_64 architecture
-drive file=...wic,format=raw,if=virtio Virtual disk image using VirtIO for better performance
-m 4090 Allocate 4090MB RAM to the VM
-bios /usr/share/ovmf/OVMF.fd Use UEFI firmware instead of legacy BIOS
-cpu Skylake-Client Emulate Skylake generation CPU
-smp cores=4 Configure 4 CPU cores
-enable-kvm Enable KVM acceleration for near-native performance
-netdev tap,... Configure TAP network backend
-device virtio-net-pci,netdev=net0 Add VirtIO network card
-nographic optional: Disable graphical output, use serial console



Download VirtualBox from the https://www.virtualbox.org/wiki/Downloads website. Choose the correct operating system to download and install the .deb file.

  1. After installing open VirtualBox.

  2. In Virtual Box go to File, Tools and open the Network Manager.

    image not found
  3. Press Create.

  4. press Properties.

  5. Go to the DHCP Server Tab.

  6. Enable the DHCP Server.

  7. Press Apply.

    image not found
  8. Congratulations your virtualbox is now ready to use.

Installing your Motorcortex Virtual Machine

Users of Motorcortex.io can download the Motorcortex xxxx.xx.x.ova file from the Store. If you want to configure your own virtual machine make sure to take a look at Virtual Machine Full Configuration.

  1. In VirtualBox go to File, Import Appliance....

    image not found
  2. In the Import Virtual Appliance wizard Choose the Motorcortex xxxx.xx.x.ova file that you have downloaded.

  3. Press Finish to create your Motorcortex virtual machine.

    image not found
  4. Congratulations your Motorcortex virtual machine is now ready.

Starting Virtual Machine

  1. Open Virtual Box, select Motorcortex 2022.09 and press Start.

    image not found
  2. The virtual machine is starting, this can take a few seconds.

    If the virtual machine does not start, a common virtual box error is:

    Failed to load the NVRAM store from the file (VERR_PATH_NOT_FOUND).
    Can't attach Nvram Storage driver (VERR_PATH_NOT_FOUND).
    Result Code:
    E_FAIL (0X80004005)
    Component:
    ConsoleWrap
    Interface:
    IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}
    

    Solution: Change the virtual machine name from Motorcortex 2024.01 to for example Motorcortex 2024. Start the virtual machine again.

    image not found
  3. The virtual machine IP is shown in the MOTD for example 192.168.56.111:

    image not found

    Use the eth0 virtual box IP address if you want to connect from your local machine to virtual machine.

  4. Log in to virtual controller.

    • Login: admin
    • Password: vectioneer
  5. The command line should look like this:

    mcx-intel:~$
    
  6. Test your connection via external machine, on your local machine open terminal and login via ssh admin@192.168.56.111, password: vectioneer.


Download VirtualBox from the https://www.virtualbox.org/wiki/Downloads website. Choose the Windows operating system and download the .exe file.

  1. Double click the .exe file.

  2. The setup wizard will pop-up click Next.

    image not found
  3. Click Next unless you want to change the location for the VirtualBox.

    image not found
  4. Click Next unless you want to change some of the custom install options.

    image not found
  5. A warning will tell you that network connections will be disconnected temporarily. Click Yes.

    image not found
  6. Click Install to start the installation.

    image not found
  7. The installation will start. During the installation a security warning will pop-up click Install.

    image not found
  8. Click Finish to complete the installation.

    image not found
  9. Congratulations you have installed VirtualBox.

Add Host Network

  1. After installing open VirtualBox.

  2. Go to File and open the Host Network Manager....

    image not found
  3. Press Create.

    image not found
  4. Check the DHCP Server.

    image not found
  5. Press Apply.

  6. Congratulations your virtual machine ready, now you only need to change your host-only ethernet settings.

Change Host-Only Ethernet Settings

  1. After creating Virtual Host-Only Ethernet Adapter.

  2. On you Windows PC, go to Network Connection.

  3. Right-click on Virtual Host-Only Ethernet Adapter and choose properties.

    image not found
  4. Disable the VirtualBox NDIS6 Bridged Network Driver, by unticking and press OK.

  5. Restart connection, right-click Virtual Host-Only Ethernet Adapter first Disable then Enable.

  6. Congratulations you windows network host-only ethernet adapter settings are set correctly, now you are ready to install Motorcortex virtual machine.

Installing your Virtual Machine

From the Motorcortex store you downloaded the Motorcortex .ova file for your virtual machine. If you want to configure your own virtual machine please check Virtual Machine Full Configuration.

  1. Open VirtualBox.

  2. Go to File and click Import Appliance....

  3. At Appliance to import Choose the motorcortex-xxxx-xx.ova file and click Next.

    image not found
  4. At the Appliance settings press Import.

    image not found
  5. The virtual machine is now installed, before starting the virtual box you have to change Adapter 1 settings from default vboxnet0 to VirtualBox Host-Only Ethernet Adapter.

    image not found
  6. Select virtual machine go to Settings, change the Name to Virtualbox Host-Only Ethernet Adaptor. Press Ok.

    image not found
  7. The Virtual Machine is now installed and ready for use.

Starting Virtual Machine

  1. Open Virtual Box, select Motorcortex 2022.09 and press Start.

    image not found
  2. The virtual machine is starting, this can take a few seconds.

    If the virtual machine does not start, a common virtual box error is:

    Failed to load the NVRAM store from the file (VERR_PATH_NOT_FOUND).
    Can't attach Nvram Storage driver (VERR_PATH_NOT_FOUND).
    Result Code:
    E_FAIL (0X80004005)
    Component:
    ConsoleWrap
    Interface:
    IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}
    

    Solution: Change the virtual machine name from Motorcortex 2024.01 to for example Motorcortex 2024. Start the virtual machine again.

    image not found
  3. The virtual machine IP is shown in the MOTD for example 192.168.56.111:

    image not found

    Use the eth0 virtual box IP address if you want to connect from your local machine to virtual machine.

  4. Log in to virtual controller.

    • Login: admin
    • Password: vectioneer
  5. The command line should look like this:

    mcx-intel:~$
    
  6. Test your connection via external machine, on your local machine open terminal and login via ssh admin@192.168.56.111, password: vectioneer.


image not found

The next step is to set-up the connection between your controller and your laptop. Connect Your PC