Running cOS Core 14.00 on M1 based Apple Devices with QEMU

Last modified on 24 Nov, 2021. Revision 3
This is a quick start guide for how to start and run NetWall Virtual Firewall using QEMU on M1 based Apple devices, this is mainly for test and demonstration usage.
Up to date for
Clavister cOS Core 14.00
Supported since
Clavister cOS Core 14.00
Status OK


Requirements

This guide assumes QEMU is already installed, there are numerous guides available online how to do this on macOS. In the example below the files AAVMF_CODE.fd and AAVMF_VARS.fd (part of QEMU) and clavister-cos-core-14.00.00.12-kvm-armv8-uefi.qcow2 (downloaded from MyClavister) are copied into a folder that will host all files needed for cOS Core.

Running cOS Core 14.00 using QEMU

The following command line will start a virtual machine with 2 GB of ram, it will use QEMUs built in SLIRP based networking backend and forward port 8080 on 127.0.0.1 to port 80 on cOS Core. 

Note: SLRIP based network in slow and should only be used for testing purposes, if good network performance is needed, see https://wiki.qemu.org/Documentation/Networking

qemu-system-aarch64 \
    -display none \
    -M virt-2.12 -cpu host -machine accel=hvf,highmem=off -m 2048 \
    -drive if=pflash,format=raw,file=AAVMF_CODE.fd,readonly=on \
    -drive if=pflash,format=raw,file=AAVMF_VARS.fd \
    -drive file=clavister-cos-core-14.00.00.12-kvm-armv8-uefi.qcow2,format=qcow2,if=none,id=vda \
    -device virtio-blk-device,drive=vda \
    -netdev user,id=n1,hostfwd=tcp:127.0.0.1:8080-0.0.0.0:80 -device virtio-net-pci,netdev=n1 \
    -serial stdio

Related articles

cOS Core 14.00 FAQ
22 Nov, 2021 arm x86
NetWall virtual firewall creation under KVM on ARM
26 May, 2021 kvm core arm coscore netwall



Tags core arm kvm