Crashed Host when passing through USB Pcie device.

GrandNewbien

Active Member
Jun 10, 2020
5
0
41
32
Hi everyone,
I passed my usb controller (xhci) through to a Home Assistant VM, which caused the host to go down as soon as I rebooted. What are some commands I can try to undo any devices I passed through. I'll likely have to connect a monitor and keyboard since the host went offline on the network.

Best Regards,
 
I guess your usb controller is in a IOMMU group with other mainboard devices and you can only passthrough whole groups. In such a case you might also passthrough some important stuff like the memory controller and then your host crashes as the host can't access it anymore.

To disable passthrough you can edit the VMs config file (nano /etc/pve/qemu-server/VMIDofYourVM.conf) and remove the "hostpci ..." line.
But to be able to edit that file you might need to boot a PVE Iso in rescue mode in case you enabled autostart for that VM so that the host always crashes after boot when the VM autostarts.
 
  • Like
Reactions: GrandNewbien
I guess your usb controller is in a IOMMU group with other mainboard devices and you can only passthrough whole groups. In such a case you might also passthrough some important stuff like the memory controller and then your host crashes as the host can't access it anymore.

To disable passthrough you can edit the VMs config file (nano /etc/pve/qemu-server/VMIDofYourVM.conf) and remove the "hostpci ..." line.
But to be able to edit that file you might need to boot a PVE Iso in rescue mode in case you enabled autostart for that VM so that the host always crashes after boot when the VM autostarts.
I very unfortunately did enable AutoStart. I could've sworn it was in it's on IOMMU Group, but it could've been an oversight.


Would disabling virtualization on the host also allow me to login and disable it?
 
Disabling virtualization in the bios of the host could lead to the failure of (auto-)starting the VM(s), yes.
I'll give that a try. Importunely it's at a remote location, but I'll drive over there in the morning!
Thanks for the help everyone, it means the world.
 
I very unfortunately did enable AutoStart. I could've sworn it was in it's on IOMMU Group, but it could've been an oversight.


Would disabling virtualization on the host also allow me to login and disable it?
If you can press e in the boot menu, you can change intel_iommu=on to intel_iommu=off (or amd_iommu=off) and get the same result.

PS: Given the trial and error that is often needed for passthrough, you might consider taking it home to work on it.
 
Last edited: