mirror of https://github.com/kholia/OSX-KVM.git
MOUNT_INSTALL_MEDIA env var allowing to opt out of BaseSystem.img mounting
This commit is contained in:
parent
adde00327a
commit
d5bbc8d752
|
@ -31,6 +31,8 @@ CPU_THREADS="4"
|
||||||
REPO_PATH="."
|
REPO_PATH="."
|
||||||
OVMF_DIR="."
|
OVMF_DIR="."
|
||||||
|
|
||||||
|
MOUNT_INSTALL_MEDIA=${MOUNT_INSTALL_MEDIA:-1}
|
||||||
|
|
||||||
# shellcheck disable=SC2054
|
# shellcheck disable=SC2054
|
||||||
args=(
|
args=(
|
||||||
-enable-kvm -m "$ALLOCATED_RAM" -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,"$MY_OPTIONS"
|
-enable-kvm -m "$ALLOCATED_RAM" -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,"$MY_OPTIONS"
|
||||||
|
@ -54,8 +56,6 @@ args=(
|
||||||
-device ich9-ahci,id=sata
|
-device ich9-ahci,id=sata
|
||||||
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2"
|
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2"
|
||||||
-device ide-hd,bus=sata.2,drive=OpenCoreBoot
|
-device ide-hd,bus=sata.2,drive=OpenCoreBoot
|
||||||
-device ide-hd,bus=sata.3,drive=InstallMedia
|
|
||||||
-drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw
|
|
||||||
-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
|
-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
|
||||||
-device ide-hd,bus=sata.4,drive=MacHDD
|
-device ide-hd,bus=sata.4,drive=MacHDD
|
||||||
# -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27
|
# -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27
|
||||||
|
@ -66,4 +66,11 @@ args=(
|
||||||
# -spice port=5900,addr=127.0.0.1,disable-ticketing=on
|
# -spice port=5900,addr=127.0.0.1,disable-ticketing=on
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ "${MOUNT_INSTALL_MEDIA}" == 1 ]]; then
|
||||||
|
args+=(
|
||||||
|
-device ide-hd,bus=sata.3,drive=InstallMedia
|
||||||
|
-drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
qemu-system-x86_64 "${args[@]}"
|
qemu-system-x86_64 "${args[@]}"
|
||||||
|
|
Loading…
Reference in New Issue