Skip to content

Instantly share code, notes, and snippets.

@cfergeau
Created March 28, 2024 14:52
Show Gist options
  • Save cfergeau/a0847af2986ec8526cb20f323ce00dce to your computer and use it in GitHub Desktop.
Save cfergeau/a0847af2986ec8526cb20f323ce00dce to your computer and use it in GitHub Desktop.
#!/bin/sh
set -exu
DISKIMG=$1
cp -c ${DISKIMG} overlay.img
GUI_ARGS="--gui --device virtio-input,keyboard --device virtio-input,pointing --device virtio-gpu,width=1920,height=1080"
SERIAL_CONSOLE_ARGS="--device virtio-serial,stdio"
./bin/vfkit --cpus 2 --memory 2048 \
--bootloader efi,variable-store=efi-variable-store,create \
--device virtio-blk,path=overlay.img \
--device virtio-net,nat,mac=72:20:43:d4:38:62 \
--device virtio-rng \
${SERIAL_CONSOLE_ARGS} \
${GUI_ARGS-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment