Hi there. I have a Ubuntu VM configured to start automatically once powered on and when I reboot TrueNAS, I find CPU utilization on one thread is constantly 100% and the VM is not up. Upon checking
I find the following error endlessly repeating: If I turn off the auto start and unplug the display (a dummy HDMI plug in actual), then I can plug it back in and manually start the VM with the GPU correctly after the system loads. I have come across a few posts regarding the same error and it seems that it is due to the GPU not being properly released. I have set up the GPU to be isolated and I do find the monitor (a real monitor which I connected to the same port for troubleshooting) freezes after TrueNAS boots and prints out a line saying that the VGA device is switched or something like that (sorry I forgot to write that down).
The GPU involved here is: and it appears in the list of isolated GPU PCI Ids as
One solution that I have read about is to add the following kernel parameters:
I presume that is going to work because it basically disabled outputting to a monitor completely, but I haven't tried because I am worried I would have no easy way of changing it back without the display.
Edit:
Also confirmed that running does solve the problem. Then the next question is, how to make sure this runs before the VM starts? The original post (targeting Proxmox) sharing this solution uses a cron job at reboot but I am not sure if it starts before the VM in TrueNAS.
Edit 2:
TrueNAS doesn't allow special cron job triggers like anyway. Wil init script do the same thing?
Edit 3:
Confirmed that adding the following command to the post-init script solves the problem Remember to change the PCI id to match your GPU if you need to do the same thing.
Code:
/var/log/messages
I find the following error endlessly repeating:
Code:
vfio-pci 0000:01:00.0: BAR 1: can't reserve [mem 0x6000000000-0x600fffffff 64bit pref]
The GPU involved here is:
Code:
01:00.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A] (rev a1) 01:00.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller (rev a1) 01:00.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller (rev a1) 01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU102 USB Type-C UCSI Controller (rev a1)
Code:
NVIDIA Corporation TU102 [GeForce RTX 2080 Ti Rev. A]
One solution that I have read about is to add the following kernel parameters:
Code:
midclt call system.advanced.update '{"kernel_extra_options": "vga=off"}'
I presume that is going to work because it basically disabled outputting to a monitor completely, but I haven't tried because I am worried I would have no easy way of changing it back without the display.
Edit:
Also confirmed that running
Code:
echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove echo 1 > /sys/bus/pci/rescan
Edit 2:
TrueNAS doesn't allow special cron job triggers like
Code:
@reboot
Edit 3:
Confirmed that adding the following command to the post-init script solves the problem
Code:
echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove && echo 1 > /sys/bus/pci/rescan
Last edited: