System crash when attempting to start a VM with Hailo PCIe device

I think you followed the guide too far. Let’s focus on restart method part.

You can check this manually by following these steps:

  1. Find ID of your hailo device in lspci -D output. On my machine it is:
0000:05:00.0 Co-processor: Hailo Technologies Ltd. Hailo-8 AI Processor (rev 01)
  1. Check your current reset method by executing
cat /sys/bus/pci/devices/0000\:05\:00.0/reset_method

(just rememeber to use your device ID).
This will most probably print flr bus.

  1. You may optionally try to reset hailo device now. But note: This will probably crash your system, just like when starting the VM! This is the reset command:
echo 1 > /sys/bus/pci/devices/0000\:05\:00.0/reset
  1. Disable reset methods for hailo device (since - according to the guide on hailo forums, it does not support resetting).
echo " " >  /sys/bus/pci/devices/0000\:05\:00.0/reset_method 
  1. Try resetting hailo device now. Hopefully nothing bad happens (but be careful: if this theory is wrong, your system may crash)
echo 1 > /sys/bus/pci/devices/0000\:05\:00.0/reset

You will probably see a response like this:

write error: Inappropriate ioctl for device

which means “sorry, I don’t know how to reset this device”.
6. If you got here without a crash, try starting the VM.

Note: Command from point 4 works only until next TrueNAS reboot. You need to find a way to run it on system startup.

1 Like