1
0
Fork 0
mirror of https://github.com/foxlet/macOS-Simple-KVM.git synced 2024-11-26 21:19:41 +01:00

Fixes for NixOS and for better handling

This commit is contained in:
Kamen Tomov 2021-12-23 11:06:41 +02:00
parent 527588d5a2
commit 03e6a72d2b
6 changed files with 12 additions and 10 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/usr/bin/env bash
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD VMDIR=$(realpath $(dirname $0))
OVMF=$VMDIR/firmware OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa #export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa #QEMU_AUDIO_DRV=pa
@ -18,11 +18,13 @@ qemu-system-x86_64 \
-drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \ -drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
-vga qxl \ -vga qxl \
-device ich9-intel-hda -device hda-output \ -device ich9-intel-hda -device hda-output \
-usb -device usb-kbd -device usb-mouse \ -usb -device usb-kbd -device usb-tablet \
-netdev user,id=net0 \ -netdev user,id=net0 \
-device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
-device ich9-ahci,id=sata \ -device ich9-ahci,id=sata \
-drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \ -drive id=ESP,if=none,format=qcow2,file="${VMDIR}/ESP.qcow2" \
-device ide-hd,bus=sata.2,drive=ESP \ -device ide-hd,bus=sata.2,drive=ESP \
-drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \ -drive id=InstallMedia,format=raw,if=none,file="${VMDIR}/BaseSystem.img" \
-device ide-hd,bus=sata.3,drive=InstallMedia \ -device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=SystemDisk,if=none,file="${VMDIR}/MyDisk.qcow2" \
-device ide-hd,bus=sata.4,drive=SystemDisk

Binary file not shown.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# jumpstart.sh: Fetches BaseSystem and converts it to a viable format. # jumpstart.sh: Fetches BaseSystem and converts it to a viable format.
# by Foxlet <foxlet@furcode.co> # by Foxlet <foxlet@furcode.co>
@ -36,4 +36,4 @@ case $argument in
;; ;;
esac esac
"$TOOLS/dmg2img" "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img" dmg2img "$TOOLS/FetchMacOS/BaseSystem/BaseSystem.dmg" "$PWD/BaseSystem.img"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# make.sh: Generate customized libvirt XML. # make.sh: Generate customized libvirt XML.
# by Foxlet <foxlet@furcode.co> # by Foxlet <foxlet@furcode.co>

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# fetch.sh: Run fetch-macos.py with safety checks # fetch.sh: Run fetch-macos.py with safety checks
# by Foxlet <foxlet@furcode.co> # by Foxlet <foxlet@furcode.co>

View file

@ -31,7 +31,7 @@
<suspend-to-disk enabled='no'/> <suspend-to-disk enabled='no'/>
</pm> </pm>
<devices> <devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator> <emulator>/run/current-system/sw/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'> <disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/> <driver name='qemu' type='qcow2'/>
<source file='VMDIR/ESP.qcow2'/> <source file='VMDIR/ESP.qcow2'/>