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

Add args array to allow comments

This commit is contained in:
Rony Lee 2022-07-24 20:45:04 +08:00
parent 7f65402ef3
commit 9a526fd731
3 changed files with 11 additions and 2 deletions

View file

@ -26,6 +26,9 @@ args=(
-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=BaseSystem.img \
-device ide-hd,bus=sata.3,drive=InstallMedia \ -device ide-hd,bus=sata.3,drive=InstallMedia \
### add device/file that you have installed macos on
#-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \
#-device ide-hd,bus=sata.4,drive=SystemDisk \
) )
qemu-system-x86_64 "${args[@]}" qemu-system-x86_64 "${args[@]}"

View file

@ -28,7 +28,7 @@ MOREARGS=()
MOREARGS+=(-nographic -vnc :0 -k en-us) MOREARGS+=(-nographic -vnc :0 -k en-us)
} }
qemu-system-x86_64 \ args=(
-enable-kvm \ -enable-kvm \
-m $MEM \ -m $MEM \
-machine q35,accel=kvm \ -machine q35,accel=kvm \
@ -50,3 +50,6 @@ qemu-system-x86_64 \
-drive id=SystemDisk,if=none,file="${SYSTEM_DISK}" \ -drive id=SystemDisk,if=none,file="${SYSTEM_DISK}" \
-device ide-hd,bus=sata.4,drive=SystemDisk \ -device ide-hd,bus=sata.4,drive=SystemDisk \
"${MOREARGS[@]}" "${MOREARGS[@]}"
)
qemu-system-x86_64 "${args[@]}"

View file

@ -6,7 +6,7 @@ OVMF=$VMDIR/firmware
#export QEMU_AUDIO_DRV=pa #export QEMU_AUDIO_DRV=pa
#QEMU_AUDIO_DRV=pa #QEMU_AUDIO_DRV=pa
qemu-system-x86_64 \ args=(
-nodefaults \ -nodefaults \
-enable-kvm \ -enable-kvm \
-m 2G \ -m 2G \
@ -24,3 +24,6 @@ qemu-system-x86_64 \
-device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 \ -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:09:49:17 \
-drive id=ESP,if=virtio,format=qcow2,file=ESP.qcow2 \ -drive id=ESP,if=virtio,format=qcow2,file=ESP.qcow2 \
-drive id=MyDisk,if=virtio,format=qcow2,file=MyDisk.qcow2 \ -drive id=MyDisk,if=virtio,format=qcow2,file=MyDisk.qcow2 \
)
qemu-system-x86_64 "${args[@]}"