AkurAI Build
Menu

cosmic-mobile

public

Latest change ea069892b84edfb00114fb9652e2610b85a860b5 - Capture Wayland GPU surfaces inside VM by AkurAI Build

#!/bin/sh
# Disposable VM; no network listener, host filesystem share, or physical device access.
set -eu
cd "$(dirname "$0")"
mkdir -p runtime
exec qemu-system-x86_64 -name cosmic-mobile -machine q35,accel=kvm -cpu host -smp 2 -m 1536 \
  -device virtio-vga-gl,xres=900,yres=1980 -display egl-headless,rendernode=/dev/dri/renderD128 \
  -device virtio-keyboard-pci -device virtio-tablet-pci -nic none \
  -virtfs local,path=runtime/captures,mount_tag=captures,security_model=mapped-xattr \
  -drive file=runtime/root.img,format=raw,if=virtio,snapshot=on \
  -kernel runtime/vmlinuz-linux -initrd runtime/initramfs-linux.img \
  -append 'root=/dev/vda3 rw console=tty0 console=ttyS0 loglevel=4' \
  -serial file:runtime/serial.log -qmp unix:runtime/qmp.sock,server=on,wait=off -pidfile runtime/vm.pid