Server crash on boot and don't have connection

ANONIMNIQ

Member
Oct 29, 2021
34
0
11
41
hoidapsuckhoe.online
I tried to passthrough my gpu Radeon RX 470 to macos VM but now everytime I start the vm my monitor goes black for a second and then lose signal. I think the server crashed because connection is lost. I made a mistake and chose start on boot option for VM and now when I start the server my monitor lose signal and connection is lost and I cant fix anything. I tried to boot in recovery mode but can't do much from there. How to remove start on boot option if I can't connect to the server and what is the problem with my gpu passthrough and how to fix it?
 
Can you still connect using SSH?

If not you could enter your BIOS/UEFI and disable IOMMU. I guess if IOMMU isn't allowed to be used by the BIOS/UEFI GPU passthrough shoudln't work and your VM should fail to autostart.
 
Last edited:
If you server crashes when passing through a PCI(e) device most of the time your IOMMU groups will be the problem. Devices are organiazed in IOMMU groups and you will passthrough a complete group, not a single device. Lets for example say your mainboard organized a PCIe slot, the onboard NIC and a RAM controller in the same IOMMU group. If you now try to passthrough the GPU to a VM, it will passthrough the whole group including your RAM controller and NIC. Your host won't be able to operate without a RAM controller or won't be accessible anymore without a NIC so your server crashes. So you basically want your GPU to be the only device in a IOMMU group.
One way to achieve that would be to try another PCIe slot until you find one that has its own IOMMU group.
If you can't find such a PCIe slot you could try to force the BIOS to split IOMMU groups (ACS override) but that doesn't always work and can be unstable.
Especially with consumer Hardware you get alot problems with IOMMU groups because these gaming Mainboards weren't designed with virtualization features like IOMMU in mind.
 
Last edited:
I enabled ACS in my BIOS and that way server don't crash, I have constant connection, but VM can't start and I still lost signal on my monitor. This is the error log:
kvm: warning: host doesnt support required feature: CPUID.01H:ECX.pcid [bit 17]
kvm: warning: host doesnt support required feature: CPUID.80000001H:ECX.fma4 [bit 16]
kvm: -device vfio-pci,host=0000.01:00.0,id=hostpci1.0,bus=ich9-pcie=port-2,addr=0x0.0,multifunction=on: vfio 0000:01:00.0: device is already attached
TASK ERROR: start failed: QEMU exited with code 1
 
Last edited:
Sounds like you have All Functions enabled for each of the functions of the device, instead of adding the multi-function device only once.
Please show the VM configuration file, which you can find in the /etc/pve/qemu-server/ directory.
 
The passthrough appears to be working but maybe the GPU does not reset properly and the drivers inside the VM cannot deal with this.
Is the same GPU used by the Proxmox host before starting the VM? Does it display the BIOS screen what booting the host? Is it the only GPU in the system? What kernel parameters (cat /proc/cmdline) are you using? Did you add or change configuration files in the /etc/modprobe.d/ directory on the host?
It is probably better if noting uses the GPU before starting the VM. I've had better luck with AMD GPUs without using the Primary GPU option (when using Linux).
I have no experience with MacOS, so sorry for this silly question but: does it actually support your RX 470?.
 
I have GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on" in grub and
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
in /etc/modules

I also do echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf

Yes, is the same GPU for Proxmox and VM, its the only GPU in the system. When I start the VM, signal is lost but the server and VM are working.
Yes, my GPU is supported of macos, I have hackintosh installed in the same machine.

Maybe I need to try with vendor reset?
 
Last edited:
Hm, now I have problem to install it. I first try apt update && apt dist-upgrade but it says that repository is unsigned and can't update. If I try to apt install pve-headera it says Unable to locate package. How to install vendor-reset properly?
 
But do you also got a valid proxmox subscription? Without it the enterprise repo wont work. So you need to buy one or get the no-subscription-repo instead.
 
I make this working by enabled my iGPU, boot from there and now when I'm start the VM and switch to HDMI port of my external GPU I see signal, but can't do anything because for some reason my keyboard is still attached to the server and not to the VM, my mouse is not attached eather. I passthrough my USB ports but my mouse and keyboard still don't work in the VM. Im not sure what to do next. If I switch to the HDMI port of my IGPU I see that my keyboard is still atached to the server.
 
You could use some software like barrier to use the same keyboard and mouse for both your VM and your server at the same time. Then you only need one mouse and keyboard to use with both. If your display got two inputs you could connect both the iGPU and the PCIe GPU to that monitor and use the monitors "switch inputs" button to change between your server and your VM.
 
Yes, I connect the 2 GPUs to the same monitor and switch between server and vm from switch input. So I need to install barrier on my proxmox server, right? or I need it installed on both server and VM, because I need my mouse and keyboard to work in bootloader too.
 
You need to install barrier to your PVE host as a server (if keyboard+mounse are attached to that) and then in your VM too but as a client so the barrier server will send your keyboard/mouse inputs over the network to your barrier clients.