UNRAID: Disabling autostart when passthrough disables the host

I found a weird ‘gotcha’ with UNRAID recently, where if you pass through a PCI-E device into a virtual machine you may lose interactivity with the host if it’s currently relying on that resource when said VM is staretd.

Furthermore, if you’re using auto-start, you’re extra screwed! As soon as you start the array, the VM is kick-started and you lose the device. You cannot modify the VM configuration without the array being mounted, so you’re stuck in this seemingly inescapable loop. Fortunately there is a pretty lightweight solution if you’re even remotely familiar with Linux.

  1. Access Settings > VM Manager from the UNRAID web interface prior to any array being started.
  2. Set Enable VMs = No and apply.
  3. Start the array, so that the disks are mounted.
    1. VMs will still not be available.
  4. At the physical UNRAID host, log into the console or SSH in.
  5. Rename the boot disk of the VM so start fails.
    1. mv /mnt/user/yourVMBootDiskArray/vm-name/vdisk1.img /mnt/user/yourVMBootDiskArray/vm-name/vdisk1.img.backup
  6.  Set Enable VMs = Yes and apply.
  7. The VM attempted to start, and has failed immediately before passthrough was able to occur. Now edit your configuration to exclude the offending device from passthrough.

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *