Hi,
Been an Unraid user for a while now. Generally had no problems with it.
I recently built a new server and migrated over to it. Never server has an optical drive, which I'd like to passthrough to a Windows 11 VM.
Using other posts on this forum, I managed to get the XML required to add to the VM's XML and successfully passthough the optical drive to the VM. Everything works as expected: I can read optical discs, etc. ... until I reboot the server.
I'm using code like this:
<hostdev mode='subsystem' type='scsi' managed='no'>
<source>
<adapter name='scsi_hostX'/>
<address bus='0' target='0' unit='0'/>
</source>
<readonly/>
<alias name='hostdev0'/>
<address type='drive' controller='1' bus='0' target='0' unit='0'/>
</hostdev>
My problem is that after a server reboot, my VM (which is set to auto-start) refuses to start.
When I enter GUI mode and try to start the VM, I see error messages indicating that they can't find device on scsi_hostX.
It seems that the X.0.0.0 number of my optical drive changes every server reboot, so I have to manually check for the correct number, and edit the XML accordingly. Then the VM starts.
Of course, since I want this VM to auto-start after a server reboot (it's my daily driver VM), this is annoyingly inconvenient having to manually edit things.
Is there a way to make the number "stick"? Or maybe an alternative way to specify a drive for passthough --> maybe something with /dev/disk/by-id like passing through a hard drive?
If there's a need for full XML, etc. Let me know and I'll be happy to provide.
Thanks in advance for your time and help!
~Jondar