I have managed to do this on archlinux, mostly by adapting examples that other (smarter) people provided in blogs.
Minimal Version:
install deps
sudo pacman -S qemu # qemu itself
sudo pacman -S ovmf # intel EFI driver
cp /usr/share/ovmf/x64/OVMF_CODE.fd bios.bin # copy OVMF_CODE.fd to bios.bin somewhere. It MUST be renamed.
start qemu
qemu-system-x86_64 \
-enable-kvm `# enable KVM optimiations` \
-L . `# dir with bios.bin` \
--bios bios.bin `# bios.bin itself` \
-m 8G `# provide reasonable amount of ram` \
-cpu host `# match the CPU type exactly` \
-drive file=/dev/sda,format=raw,media=disk `# load raw HDD`
Performance Optimizations
The following flags were also recommended to me, and I have been using them successfully.
# emulate exact host cpu,
# enable hyper-v enlightenments
-enable-kvm
-cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time
-machine type=pc,accel=kvm
# use all available CPU cores
-smp $(nproc)
Viewer
I used spice as a viewer:
-daemonize `# don't start monitor, we connect using RDP` \
-vga qxl \
-spice port=5930,disable-ticketing \
-device virtio-serial \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent \
Followed by the following to display viewer
spicy -h 127.0.0.1 -p 5930 & disown spicy; # spice-gtk
Windows Bootloader Warning
Finally, beware of the windows bootloader if you are using multiple disks. I have a windows-install now that will not boot unless a second non-OS drive is also present.
References
I wish I kept my sources here - I remember at least the following were super helpful:
https://wiki.qemu.org/Main_Page
https://qemu.weilnetz.de/doc/qemu-doc.html
https://wiki.archlinux.org/index.php/QEMU
https://wiki.gentoo.org/wiki/QEMU
https://www.suse.com/documentation/sles11/book_kvm/data/part_2_book_book_kvm.html
Good Luck!