mirror of
https://github.com/foxlet/macOS-Simple-KVM
synced 2024-11-25 12:40:18 +00:00
26 lines
946 B
Bash
Executable file
26 lines
946 B
Bash
Executable file
#!/bin/bash
|
|
|
|
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
|
|
VMDIR=$PWD
|
|
OVMF=$VMDIR/firmware
|
|
#export QEMU_AUDIO_DRV=pa
|
|
#QEMU_AUDIO_DRV=pa
|
|
|
|
qemu-system-x86_64 \
|
|
-nodefaults \
|
|
-enable-kvm \
|
|
-m 2G \
|
|
-machine q35,accel=kvm \
|
|
-smp 4,cores=2 \
|
|
-cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \
|
|
-device isa-applesmc,osk="$OSK" \
|
|
-smbios type=2 \
|
|
-drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \
|
|
-drive if=pflash,format=raw,file="$OVMF/OVMF_VARS-1024x768.fd" \
|
|
-vga std \
|
|
-device ich9-intel-hda -device hda-output \
|
|
-usb -device usb-kbd -device usb-mouse \
|
|
-netdev user,id=net0 \
|
|
-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=MyDisk,if=virtio,format=qcow2,file=MyDisk.qcow2 \
|