May 9, 20242 yr I want to passthrough a couple of M.2 SSDs. I am able to do the passthrough with a simple Linux VM configuration using the UI (confirmed with testing). When I try to do the passthrough to another Linux VM though, one that has some manual modifications done to its XML configuration file, it messes up the XML configuration and VM won't boot. I've seen this Unraid bug before where if you switch back to UI mode and save after manually modifying VM's XML config it can mess it up. So I backed it up and was able to recover but I'm stuck as to how to add the passthrough for the m.2s manually to my xml file.
May 9, 20242 yr Community Expert 2 hours ago, JKunraid said: I want to passthrough a couple of M.2 SSDs. I am able to do the passthrough with a simple Linux VM configuration using the UI (confirmed with testing). When I try to do the passthrough to another Linux VM though, one that has some manual modifications done to its XML configuration file, it messes up the XML configuration and VM won't boot. I've seen this Unraid bug before where if you switch back to UI mode and save after manually modifying VM's XML config it can mess it up. So I backed it up and was able to recover but I'm stuck as to how to add the passthrough for the m.2s manually to my xml file. You can manually add path /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_x-00: to the drive in the GUI or bind the drive to vfio and then you can add as a PCI device in the template.
May 9, 20242 yr Author 15 hours ago, SimonF said: You can manually add path /dev/disk/by-id/usb-SanDisk_Cruzer_Blade_x-00: to the drive in the GUI or bind the drive to vfio and then you can add as a PCI device in the template. Thanks again for reply Simon. Not following you though. I've already done the vfio bind in system devices and confirmed I can add the m.2 drives to another basic VM using Unraids VM template GUI. That VM boots fine and adds the drives. The issue is if I use the VM template tool in form view to add the m.2 drives to another VM that has a manually modified XML config template. My second VM boots fine. When I use to VM template form view to modify the config (rather than the config directly using the "xml text" toggle) it messes up my manually modified XML config. The system won't boot then. In other words, what I'm trying to figure out is what text lines do I need to add to my VM's XML configuration to get the two m.2 drives to do the passthrough? (i.e. rather than using the form view) (Edit:" The devices below are available as an option in the VM's form view but if I check the boxes and click update the VM doesn't boot. I have to repaste a backup of the xml config to get it to boot again) Other PCI Devices: AMD RAID Bottom Device | Non-Volatile memory controller (43:00.0) AMD RAID Bottom Device | Non-Volatile memory controller (44:00.0) Edited May 9, 20242 yr by JKunraid
May 9, 20242 yr Community Expert Solution 42 minutes ago, JKunraid said: Thanks again for reply Simon. Not following you though. I've already done the vfio bind in system devices and confirmed I can add the m.2 drives to another basic VM using Unraids VM template GUI. That VM boots fine and adds the drives. The issue is if I use the VM template tool in form view to add the m.2 drives to another VM that has a manually modified XML config template. My second VM boots fine. When I use to VM template form view to modify the config (rather than the config directly using the "xml text" toggle) it messes up my manually modified XML config. The system won't boot then. In other words, what I'm trying to figure out is what text lines do I need to add to my VM's XML configuration to get the two m.2 drives to do the passthrough? (i.e. rather than using the form view) (Edit:" The devices below are available as an option in the VM's form view but if I check the boxes and click update the VM doesn't boot. I have to repaste a backup of the xml config to get it to boot again) Other PCI Devices: AMD RAID Bottom Device | Non-Volatile memory controller (43:00.0) AMD RAID Bottom Device | Non-Volatile memory controller (44:00.0) The pci devices will in hostdev sections the source will match the pci id i.e. bus=43 slot=00 feature=0 Do you specify a boot order for the boot device in the form view? post xml.
May 9, 20242 yr Author 33 minutes ago, SimonF said: The pci devices will in hostdev sections the source will match the pci id i.e. bus=43 slot=00 feature=0 Do you specify a boot order for the boot device in the form view? post xml. Yes. A virtio vdisk is set to "1" on boot field. It has a working OS. The m.2 drives are for secondary drives not operating system... I have nearly the same setup on the simpler VM and i have no issue using the form view to add them in. It's the manually modified xml VM that has the issue. I could start from scratch again but I took hours to get the VM working for my particular configuration. It would be a lot simpler if I could add the lines into the xml manually. Edited May 9, 20242 yr by JKunraid
May 10, 20242 yr Author 49 minutes ago, SimonF said: The pci devices will in hostdev sections the source will match the pci id i.e. bus=43 slot=00 feature=0 Do you specify a boot order for the boot device in the form view? post xml. UPDATE: I did of search of devices with bus 43 (and 44) as you suggested using the broken XML. As the XML was nested I assumed the parent lines of XML were also required. I added these lines to working XML config just above the <memballon model='none'/> line. It booted and showed the two drives. I need to spend a bit of time making sure I haven't broken anything but as it stands it seems to be working.. I'll update as soon as I know for sure. <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x43' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x44' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </hostdev> Edited May 10, 20242 yr by JKunraid
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.