Running x86_64 Windows 7 on Apple M1 qemu-system-x86_64 ------------------------------------------------------- _ _ _ _ ______ ___ ___ __ | | | (_) | | |___ / | \/ |/ | | | | |_ _ __ __| | _____ _____ / / | . . |`| | __ _ ___ _ __ ___ _ _ | |/\| | | '_ \ / _` |/ _ \ \ /\ / / __| / / | |\/| | | | / _` |/ _ \ '_ ` _ \| | | | \ /\ / | | | | (_| | (_) \ V V /\__ \ ./ / | | | |_| |_ | (_| | __/ | | | | | |_| | \/ \/|_|_| |_|\__,_|\___/ \_/\_/ |___/ \_/ \_| |_/\___/ \__, |\___|_| |_| |_|\__,_| | | |_| # Prerequisites on MacOS Big Sur (M1) for building qemu # Full Xcode # Easiest way to get qemu up is probaly via homebrew, but I don't use it and I rather compile all tools from source myself. What helps is to build the UTM project (qemu) since they include nice helper script to download and compile all the needed software to be able to compile qemu from source on Apple M1 Big Sur https://github.com/utmapp/UTM # Assuming we have qemu compiled and installed on the Big Sur M1 Preparing the Virtualization environment for Win7 x86_64 # Create a working dir for the VM mkdir Win7 cd Win7 qemu-img create -f qcow2 disk.img 20G (create a qcow2 disk image file) # Get Win7 ISO # Download drivers.iso (Redhat Virtio Drivers) wget http://45.76.81.249/M1-Apple/qemu-x86_64/drivers.iso # Save the following install.sh script to setup Windows 7 qemu-system-x86_64 \ -smp 2 \ -cpu core2duo \ -m 2048 \ -drive file=disk.img,if=virtio,cache=none,index=1 \ -drive file=cd.iso,index=2,media=cdrom \ -drive file=drivers.iso,index=3,media=cdrom \ -boot d \ -net nic,model=virtio \ -net user,hostfwd=tcp::3389-:3389 # run the above install.sh script, Windows installer will complain it does not see any disk drive to install - so choose the secondary CDROM and load the SCSCI virtio drivers from there # Once virtio drivers are loaded you should see the virtual HDD disk to install Windows to # Once installed you can run the simulation via this run.sh script qemu-system-x86_64 \ -accel tcg \ -smp 2 \ -cpu core2duo \ -m 2048 \ -device intel-hda -device hda-duplex \ -drive file=disk.img,if=virtio,cache=none,index=1 \ -drive file=drivers.iso,index=3,media=cdrom \ -boot d \ -net nic,model=virtio \ -net user,hostfwd=tcp::3389-:3389 # For network - make sure to install the Virtio NET drivers again from the drivers.iso CDROM, otherwise network won't work # Virtio drivers speed up the whole simulation greatly on the M1 # For RDP you can use the localhost TCP 3389 port (use Xfreerdp2 to connect to localhost to access the VM if you want that) otherwise the VGA framebuffer is sufficient. # For SMP test you can try the run-smp.sh script qemu-system-x86_64 \ -accel tcg \ -smp 8,sockets=1,cores=8 \ -cpu core2duo \ -m 2048 \ -device intel-hda -device hda-duplex \ -drive file=disk.img,if=virtio,cache=none,index=1 \ -drive file=drivers.iso,index=3,media=cdrom \ -boot d \ -net nic,model=virtio \ -net user,hostfwd=tcp::3389-:3389 # If you need to install any additional softvare via CD - replace the drivers.is # Enjoy the VM :) # If you have issues you can reach me @ twitter/astr0baby