[an error occurred while processing this directive]

Запуск macOS в виртуальной машине на базе QEMU/KVM
Скрипт для запуска macOS в виртуальной машине (файлы с прошивками можно
скопировать из snap sosum, proxmox или пакета ovmf из Fedora, Ubuntu или Debian).

#!/bin/bash
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"

   /usr/bin/qemu-system-x86_64 \
    -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 \
    -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0 \
    -serial mon:stdio \
    -drive if=pflash,format=raw,readonly,file=./firmware/OVMF_CODE.fd \
    -drive if=pflash,format=raw,file=./firmware/OVMF_VARS-1024x768.fd \
    -device virtio-vga,virgl=on \
    -display sdl,gl=on \
    -L "$SNAP"/usr/share/seabios/ \
    -L "$SNAP"/usr/lib/ipxe/qemu/ \
    -audiodev pa,id=pa,server="/run/user/$(id -u)/pulse/native" \
    -device ich9-intel-hda -device hda-output,audiodev=pa \
    -usb -device usb-kbd -device usb-mouse \
    -netdev user,id=net0 \
    -device vmxnet3,netdev=net0,id=net0 \
    -drive id=ESP,if=virtio,format=qcow2,file=./ESP.qcow2 \
    -drive id=SystemDisk,if=virtio,file=./macos.qcow2


Для установки macOS в виртуальной машине c использованием образа BaseSystem.img
дополнительно нужно добавить строку:

    -drive id=InstallMedia,format=raw,if=virtio,file=./BaseSystem.img

Для загрузки установочного образа macOS можно использовать скрипт fetch-macos.py.
 
Ключи: macos, qemu, kvm, boot / Лицензия: CC-BY
Раздел:    Корень / Безопасность / Виртуализация - Xen, OpenVZ, KVM, Qemu

[an error occurred while processing this directive]

[an error occurred while processing this directive]