Skip to content

Instantly share code, notes, and snippets.

@shpark
Created July 5, 2021 04:27
Show Gist options
  • Save shpark/d4529f77552742f178212b7d9608bc8c to your computer and use it in GitHub Desktop.
Save shpark/d4529f77552742f178212b7d9608bc8c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
KERNEL=$1
DISKIMG=$2
# NOTE: You can omit `virtio_mmio.device=4K@0xd0000000:5`
qemu-system-x86_64 -machine microvm \
-drive file=$DISKIMG,format=raw,id=id0 \
-device virtio-blk-device,drive=id0 \
-m 4G -smp 8 \
-kernel $KERNEL \
-append "root=/dev/vda rw pci=off console=ttyS0 virtio_mmio.device=4K@0xd0000000:5" \
-nographic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment