Zeal-Operating-System / ZealOS

The Zeal Operating System is a modernized fork of the 64-bit Temple Operating System, TempleOS.
https://zealos.net
The Unlicense
1.42k stars 68 forks source link

QEMU install tweaks for running in Windows #114

Closed CoderHobbs closed 1 year ago

CoderHobbs commented 1 year ago

The current QEMU instructions are Linux-specific. I added a few lines to the markdown file to illustrate the different accel parameter, and to add some powershell to (slowly) calculate the correct number of cores. Only contributers can get at the Wiki, so here is a diff:


diff --git a/Installing-(QEMU).md b/Installing-(QEMU).md
index 3bbf166..c34297e 100644
--- a/Installing-(QEMU).md
+++ b/Installing-(QEMU).md
@@ -1,7 +1,10 @@
 1. Create a new virtual machine hard disk drive.
   * `qemu-img create -f qcow2 ZealOS.qcow2 1G`
 2. Launch a new virtual machine with the latest ISO and the hard disk.
-  * `qemu-system-x86_64 -audiodev sdl,id=snd0 -machine q35,kernel_irqchip=off,pcspk-audiodev=snd0,accel=kvm -cdrom ZealOS-YYYY-MM-DD-HH_MM_SS.iso -hda ZealOS.qcow2 -m 2G -smp $(nproc) -rtc base=localtime -nic user,model=pcnet`
+  * Linux:
+  `qemu-system-x86_64 -audiodev sdl,id=snd0 -machine q35,kernel_irqchip=off,pcspk-audiodev=snd0,accel=kvm -cdrom ZealOS-YYYY-MM-DD-HH_MM_SS.iso -hda ZealOS.qcow2 -m 2G -smp $(nproc) -rtc base=localtime -nic user,model=pcnet`
+  * Windows - The same but with different accel and using PowerShell to provide the number of cores:
+  `qemu-system-x86_64.exe -audiodev sdl,id=snd0 -machine q35,kernel_irqchip=off,pcspk-audiodev=snd0,accel=whpx -cdrom ZealOS-YYYY-MM-DD-HH_MM_SS.iso -hda ZealOS.qcow2 -m 2G -smp $(get-computerinfo -property csprocessors).csprocessors.numberofcores -rtc base=localtime -nic user,model=pcnet`
 3. Start the VM.
 4. Press any key to dismiss the splash screen.
 5. Type `Y` when asked if you want to install onto a hard drive.```
Midnoclose commented 1 year ago

Changes added. Thanks!