Test Winnux in QEMU

QEMU with KVM is the recommended way to test Winnux during development.

Install QEMU

# Ubuntu/Debian:
sudo apt install qemu-system-x86 qemu-utils ovmf

# Fedora:
sudo dnf install qemu-system-x86 qemu-img edk2-ovmf

Create disk image

qemu-img create -f raw winnux-test.raw 20G

Boot Winnux

qemu-system-x86_64 \
  -enable-kvm \
  -m 4096 \
  -smp 4 \
  -cpu host \
  -bios /usr/share/OVMF/OVMF_CODE.fd \
  -drive file=winnux-0.1.raw,format=raw,if=virtio \
  -drive file=winnux-test.raw,format=raw,if=virtio \
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0 \
  -display gtk

Headless testing

For automated testing:

qemu-system-x86_64 \
  -enable-kvm \
  -m 4096 \
  -smp 4 \
  -cpu host \
  -bios /usr/share/OVMF/OVMF_CODE.fd \
  -drive file=winnux-0.1.raw,format=raw,if=virtio \
  -nographic \
  -serial mon:stdio

Tips