VM Display Errors
Long time watcher, first time poster so please be gentle haha
Currently trying to setup a QEMU based Hackintosh based around Foxlet's github (link) and I managed to get it working through my GUI, but i'm trying to passthrough the GPU and it spent the past 3hrs spitting out errors and refusing to boot. I managed to sucessfully execute the shell script and recieve an output on the display BUT:
I've checked through and confirmed all the PCIE devices in that IOMMU group are pushed into VFIO_PCI, so I don't think it's a config error I think there's probably something wrong with the parameters in my booting script (unhide spoiler for code)
#!/bin/bash
# Confirm VFIO is running
modprobe vfio-pci
# Unbinds active devices
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
echo '0000:07:00.1' | sudo tee /sys/bus/pci/devices/0000:07:00.1/driver/unbind
echo '0000:00:03.1' | sudo tee /sys/bus/pci/devices/0000:00:03.1/driver/unbind
# Binds PCIe bus
echo 1022 1452 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
echo 1022 1453 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
# Binds GPU + HDA
echo 1002 aaf0 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
echo 1002 67df | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
#Starts Pulseaudio (Not entirely sure why this is needed but it stopped errors)
pulseaudio -D
OSK="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VMDIR=$PWD
OVMF=$VMDIR/firmware
export QEMU_AUDIO_DRV=pa
QEMU_AUDIO_DRV=pa
# VM initialization
qemu-system-x86_64 \
-enable-kvm \
-m 12G \
-vnc :1 \
-machine q35,accel=kvm \
-smp sockets=1,cores=4 \
-cpu host \
-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" \
-device ich9-intel-hda -device hda-output \
-usb -device usb-kbd -device usb-mouse \
-netdev user,id=net0 \
-device e1000-82545em,netdev=net0,id=net0,mac=0e:ab:81:92:e0:89 \
-device ich9-ahci,id=sata \
-drive id=ESP,if=none,format=qcow2,file=ESP.qcow2 \
-device ide-hd,bus=sata.2,drive=ESP \
-drive id=InstallMedia,format=raw,if=none,file=BaseSystem.img \
-device ide-hd,bus=sata.3,drive=InstallMedia \
-drive id=SystemDisk,if=none,file=Disk.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \
-vga none \
-device pcie-root-port,bus=pcie.0,multifunction=on,port=1,chassis=1,id=port.1 \
-device vfio-pci,host=07:00.0,bus=port.1,multifunction=on,romfile=/vm/RX580.rom \
-device vfio-pci,host=07:00.1,bus=port.1 \
I'mma be real with y'all, I am waaaay in over my head. Like I understand this sorta stuff, but I am not Anthony. Anyone got any idea of where I'm going wrong, and what could fix it? I'm at a dead end...

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now