Skip to content

Instantly share code, notes, and snippets.

@oko
Created November 29, 2019 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oko/cd44ee059f971fdbb3a934a8b89fb001 to your computer and use it in GitHub Desktop.
Save oko/cd44ee059f971fdbb3a934a8b89fb001 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -eux
eficode="$1"
efivars="$2"
wd="$(mktemp -d)"
vars="$wd/$(basename "$efivars")"
cp "$efivars" "$vars"
qemu-system-x86_64 \
-name guest=ovmftest \
-enable-kvm -cpu host \
-nographic \
-drive if=pflash,format=raw,readonly,file="$eficode" \
-drive if=pflash,format=raw,file="$vars" \
-netdev tap,id=net0 \
-device virtio-net-pci,romfile=,netdev=net0 -net none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment