Skip to content

Instantly share code, notes, and snippets.

@rcj4747
Created June 21, 2018 15:57
Show Gist options
  • Save rcj4747/da7845bee58bc43d6e2f2e7f8e720963 to your computer and use it in GitHub Desktop.
Save rcj4747/da7845bee58bc43d6e2f2e7f8e720963 to your computer and use it in GitHub Desktop.
Simulate NVMe with KVM
## Install trusty desktop on an NVMe device (with uefi)
sudo apt-get install ovmf zsync
qemu-img create nvme.img 10G
zsync http://cdimage.ubuntu.com/daily-live/current/trusty-desktop-amd64.iso.zsync
# copy OVMF.fd to use "-pflash" option and thus have persistent nvram storage
cp /usr/share/ovmf/OVMF.fd .
qemu-system-x86_64 -pflash OVMF.fd -m 1024 -cdrom trusty-desktop-amd64.iso -drive file=nvme.img,if=none,id=D22 -device nvme,drive=D22,serial=1234 --enable-kvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment