Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Optical Drive Passthrough -- scsi_hostX changes every time server reboots

Featured Replies

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

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.