gfjardim Posted March 3, 2016 Share Posted March 3, 2016 USB3 is at 00.1a.0, and USB4 at 00.1d.0. Quote Link to comment
theone Posted March 3, 2016 Share Posted March 3, 2016 USB3 is at 00.1a.0, and USB4 at 00.1d.0. Yes I know but according to the lspci they are also coming from the PCH C222 and also no port seems to be physically connected to these controllers. Quote Link to comment
hhs99 Posted March 5, 2016 Share Posted March 5, 2016 i'm having a little trouble with the pass though. what should i put for bus and slot s on this? 0e:00.0 USB controller: ASMedia Technology Inc. Device 1242 Anyone know? I got my other controller passed though but not this one Quote Link to comment
CHBMB Posted March 5, 2016 Share Posted March 5, 2016 i'm having a little trouble with the pass though. what should i put for bus and slot s on this? 0e:00.0 USB controller: ASMedia Technology Inc. Device 1242 Anyone know? I got my other controller passed though but not this one You tried... host=0e:00.0 ? Quote Link to comment
hhs99 Posted March 5, 2016 Share Posted March 5, 2016 ive tried <source> <address domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </source> With no results. Am I doing that right? Quote Link to comment
hhs99 Posted March 5, 2016 Share Posted March 5, 2016 for others that have my problem I figured it out. if the address is 0e:00.0 than it would look like this <source> <address domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/> </source> sorry for noise Quote Link to comment
CHBMB Posted March 5, 2016 Share Posted March 5, 2016 for others that have my problem I figured it out. if the address is 0e:00.0 than it would look like this <source> <address domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/> </source> sorry for noise My bad, assumed you were using qemu.... Quote Link to comment
hhs99 Posted March 5, 2016 Share Posted March 5, 2016 no worries your threads and posts have helped me set up a great gaming rig for me and the wife. Quote Link to comment
CHBMB Posted March 5, 2016 Share Posted March 5, 2016 no worries your threads and posts have helped me set up a great gaming rig for me and the wife. Really?! Sure you got the right person, I pride myself on mostly posting complete drivel... lol Quote Link to comment
Rexxer Posted March 13, 2016 Share Posted March 13, 2016 This is strange to me. This is the result of readlink for usb3 4 and 5. root@Tower:~# readlink /sys/bus/usb/devices/usb3 ../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb3 root@Tower:~# readlink /sys/bus/usb/devices/usb4 ../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb4 root@Tower:~# readlink /sys/bus/usb/devices/usb5 ../../../devices/pci0000:00/0000:00:1c.7/0000:70:00.0/usb5 This is usb1 and 2 root@Tower:~# readlink /sys/bus/usb/devices/usb1 ../../../devices/pci0000:00/0000:00:14.0/usb1 root@Tower:~# readlink /sys/bus/usb/devices/usb2 ../../../devices/pci0000:00/0000:00:14.0/usb2 My motherboard is an ASUS Maximus VIII Hero with an i7-6700k if that matters. If I want to pass through usb3 or usb4 would I put a hostdev line in my XML using 0000:00:1c.0 or 0000:04:00.0 or both? Quote Link to comment
saarg Posted March 13, 2016 Share Posted March 13, 2016 This is strange to me. This is the result of readlink for usb3 4 and 5. root@Tower:~# readlink /sys/bus/usb/devices/usb3 ../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb3 root@Tower:~# readlink /sys/bus/usb/devices/usb4 ../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb4 root@Tower:~# readlink /sys/bus/usb/devices/usb5 ../../../devices/pci0000:00/0000:00:1c.7/0000:70:00.0/usb5 This is usb1 and 2 root@Tower:~# readlink /sys/bus/usb/devices/usb1 ../../../devices/pci0000:00/0000:00:14.0/usb1 root@Tower:~# readlink /sys/bus/usb/devices/usb2 ../../../devices/pci0000:00/0000:00:14.0/usb2 My motherboard is an ASUS Maximus VIII Hero with an i7-6700k if that matters. If I want to pass through usb3 or usb4 would I put a hostdev line in my XML using 0000:00:1c.0 or 0000:04:00.0 or both? You should use the last address, so 04:00.0. Quote Link to comment
EMKO Posted March 17, 2016 Share Posted March 17, 2016 wow works great can't Unraid automate this? Unraid way i would get USB to work for 1-2min this way works and i can change the usb device at any time. Only problem if i change anything in the VM this VM text gets reset Quote Link to comment
psychofuzzie Posted March 26, 2016 Share Posted March 26, 2016 Howdy folks, somewhat of a noob here, was curious if you could help. I'm trying to get my two 3.0 ports on the front of my rig to work, but I don't think I fully comprehend the directions here. I've seen bits and pieces about binding devices to a VFIO driver, but can't make heads or tails of it. What I've done so far in relation to the 12 steps listed at the top of this thread: 1. using KVM directly connected to rig, not SSH 2. found 13 controllers listed 3. Broke out the notepad 4. unRAID is on Bus 008 Device 003: SanDisk Corp. Cruzer Fit 5. Found the two ports I want on Bus 006 Device 003 and Bus 006 Device 004, both WD Externals plugged in 6. output from readlink /sys/bus/usb/devices/usb6 is ../../../devices/pci0000:00/0000:00:15.3/0000:0c:00.0/usb6 7. Where I get a bit confused, I'm assuming that 0000:00:15.3 and 0000:0c:00.0 are both devices though 8. Went to said place 9. List of all devices in Group 16, what I want in red: /sys/kernel/iommu_groups/16/devices/0000:00:15.0 /sys/kernel/iommu_groups/16/devices/0000:00:15.1 /sys/kernel/iommu_groups/16/devices/0000:00:15.2 /sys/kernel/iommu_groups/16/devices/0000:00:15.3 /sys/kernel/iommu_groups/16/devices/0000:0a:00.0 /sys/kernel/iommu_groups/16/devices/0000:0b:00.0 /sys/kernel/iommu_groups/16/devices/0000:0c:00.0 10. I'll skip, I'm on Version 6.1.6 11. I tried both. Here's my XML before changes: <domain type='kvm'> <name>Onyx-PC</name> <uuid>9e9576cb-1876-d455-2a0f-af749bff9088</uuid> <description>Windows Daily Driver</description> <metadata> <vmtemplate name="Custom" icon="windows.png" os="windows"/> </metadata> <memory unit='KiB'>12582912</memory> <currentMemory unit='KiB'>12582912</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='3'/> </cputune> <os> <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='4' threads='1'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/vDisks/Onyx-PC/vdisk1.img'/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/Array vDisks/Onyx-PC/vdisk2.img'/> <target dev='hdd' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/ISOs/Windows 7/Windows 7 SP1 Ultimate (64 Bit).iso'/> <target dev='hda' bus='ide'/> <readonly/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/ISOs/VirtIOs/virtio-win-0.1.102.iso'/> <target dev='hdb' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:3e:9e:81'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Onyx-PC.org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x1b1c'/> <product id='0x0c03'/> </source> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x0e6f'/> <product id='0x0213'/> </source> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x046d'/> <product id='0xc22d'/> </source> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x046d'/> <product id='0xc52b'/> </source> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x1058'/> <product id='0x0827'/> </source> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </memballoon> </devices> </domain> 11a. I added after </devices> and before </domain>: <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:15.3,bus=root.1,addr=00.0'/> </qemu:commandline> note I deleted the 'e' after pci in the 3rd line. I saw this variance in a few different posts. I get this error: internal error: early end of file from monitor: possible problem: 2016-03-26T21:38:17.331133Z qemu-system-x86_64: -device vfio-pci,host=00:15.3,bus=root.1,addr=00.0: vfio: error opening /dev/vfio/16: No such file or directory 2016-03-26T21:38:17.331156Z qemu-system-x86_64: -device vfio-pci,host=00:15.3,bus=root.1,addr=00.0: vfio: failed to get group 16 2016-03-26T21:38:17.331166Z qemu-system-x86_64: -device vfio-pci,host=00:15.3,bus=root.1,addr=00.0: Device initialization failed 2016-03-26T21:38:17.331175Z qemu-system-x86_64: -device vfio-pci,host=00:15.3,bus=root.1,addr=00.0: Device 'vfio-pci' could not be initialized I've tried many different combinations of things too, such as host=0c:00.0, etc, and just cant get it to fire up. 11b. I pasted the following before the line containing <memballoon model='virtio'>: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x15' function='0x3'/> </source> </hostdev> and get this error message: Failed to bind PCI device '0000:00:15.3' to vfio-pci: No such device Obviously, I'm missing something. I've scoured everything that I would think would help, but could use some assistance. Thanks so much for looking at this for me! Quote Link to comment
psychofuzzie Posted March 26, 2016 Share Posted March 26, 2016 IMMEDIATELY after posting this I saw a hot fix for such an issue. Please hold, I'll try that first. Quote Link to comment
saarg Posted March 26, 2016 Share Posted March 26, 2016 IMMEDIATELY after posting this I saw a hot fix for such an issue. Please hold, I'll try that first. You only pass through the last device number. You also have to enable the ACS override in the VM manager settings to separate the devices in their own groups. Quote Link to comment
psychofuzzie Posted March 27, 2016 Share Posted March 27, 2016 IMMEDIATELY after posting this I saw a hot fix for such an issue. Please hold, I'll try that first. You only pass through the last device number. You also have to enable the ACS override in the VM manager settings to separate the devices in their own groups. Thanks for the tip, I see that in other posts in this thread now. I've enabled ACS Override, so now the IOMMU groups look like this for the respective USB controller: /sys/kernel/iommu_groups/19/devices/0000:00:15.3 /sys/kernel/iommu_groups/29/devices/0000:0c:00.0 Using that information, I've changed the qemu section to this: <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=0c.00,bus=root.1,addr=00.0'/> </qemu:commandline> which throws this error: Hook script execution failed: internal error: Child process (LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /etc/libvirt/hooks/qemu Onyx-PC start begin -) unexpected exit status 1: Failed to bind device 0c.00 to vfio-pci driver So I tried using hostdev. Here's that code: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/> </source> </hostdev> Oddly enough, it throws this: internal error: Did not find USB device 1058:827 and added this before the </hostdev> tag: <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> I rebooted my box, thinking that would clear it, but I still get the same error. I don't think I've missed anything else, but I just can't seem to hack it. Do I need to do the hot fix as described in this thread? http://lime-technology.com/forum/index.php?topic=44010.0 Thanks again for helping this noob. Quote Link to comment
saarg Posted March 27, 2016 Share Posted March 27, 2016 IMMEDIATELY after posting this I saw a hot fix for such an issue. Please hold, I'll try that first. You only pass through the last device number. You also have to enable the ACS override in the VM manager settings to separate the devices in their own groups. Thanks for the tip, I see that in other posts in this thread now. I've enabled ACS Override, so now the IOMMU groups look like this for the respective USB controller: /sys/kernel/iommu_groups/19/devices/0000:00:15.3 /sys/kernel/iommu_groups/29/devices/0000:0c:00.0 Using that information, I've changed the qemu section to this: <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=0c.00,bus=root.1,addr=00.0'/> </qemu:commandline> which throws this error: Hook script execution failed: internal error: Child process (LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /etc/libvirt/hooks/qemu Onyx-PC start begin -) unexpected exit status 1: Failed to bind device 0c.00 to vfio-pci driver So I tried using hostdev. Here's that code: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/> </source> </hostdev> Oddly enough, it throws this: internal error: Did not find USB device 1058:827 and added this before the </hostdev> tag: <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> I rebooted my box, thinking that would clear it, but I still get the same error. I don't think I've missed anything else, but I just can't seem to hack it. Do I need to do the hot fix as described in this thread? http://lime-technology.com/forum/index.php?topic=44010.0 Thanks again for helping this noob. In the qemu:arg you forgot .0 in the host address. The error you receive on your second try have nothing to do with the hostdev tag you added. It's a USB device you have passed through that is not connected anymore. Did you have that USB device in one of the ports of the controller you are trying to pass through? Quote Link to comment
psychofuzzie Posted March 27, 2016 Share Posted March 27, 2016 IMMEDIATELY after posting this I saw a hot fix for such an issue. Please hold, I'll try that first. You only pass through the last device number. You also have to enable the ACS override in the VM manager settings to separate the devices in their own groups. Thanks for the tip, I see that in other posts in this thread now. I've enabled ACS Override, so now the IOMMU groups look like this for the respective USB controller: /sys/kernel/iommu_groups/19/devices/0000:00:15.3 /sys/kernel/iommu_groups/29/devices/0000:0c:00.0 Using that information, I've changed the qemu section to this: <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=0c.00,bus=root.1,addr=00.0'/> </qemu:commandline> which throws this error: Hook script execution failed: internal error: Child process (LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ /etc/libvirt/hooks/qemu Onyx-PC start begin -) unexpected exit status 1: Failed to bind device 0c.00 to vfio-pci driver So I tried using hostdev. Here's that code: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/> </source> </hostdev> Oddly enough, it throws this: internal error: Did not find USB device 1058:827 and added this before the </hostdev> tag: <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> I rebooted my box, thinking that would clear it, but I still get the same error. I don't think I've missed anything else, but I just can't seem to hack it. Do I need to do the hot fix as described in this thread? http://lime-technology.com/forum/index.php?topic=44010.0 Thanks again for helping this noob. In the qemu:arg you forgot .0 in the host address. The error you receive on your second try have nothing to do with the hostdev tag you added. It's a USB device you have passed through that is not connected anymore. Did you have that USB device in one of the ports of the controller you are trying to pass through? Yes, I had two devices plugged into them. I made this change: <qemu:arg value='vfio-pci,host=0c:00.0,bus=root.1,addr=00.0'/> both with a colon and a period to see, and now get 'path is not accessible '/dev/bus/usb/006/003' no such file or directory'. I used midnight commander to see that there is an item '-003' in that directory, but then it just disappears. I've reseated the 3.0 cable on my mobo, and every time I reboot it's there for about 10 minutes, or until I try to launch my VM. Would it make any difference that before I turned on ACS they were in the same IOMMU group as my NIC? everything's separated now of course, I'm just thinking aloud. Quote Link to comment
saarg Posted March 27, 2016 Share Posted March 27, 2016 For testing you should remove all the devices connected to the USB ports you want to pass through. Please post the output of the lsusb command or the USB devices list in Tools --> System devices in the webgui. Do not pass through any USB devices in the VM template that is connected to the controller you want to pass through. Which version of unraid are you running? Quote Link to comment
psychofuzzie Posted March 27, 2016 Share Posted March 27, 2016 For testing you should remove all the devices connected to the USB ports you want to pass through. Went ahead and did this, same result: couldn't find device. Please post the output of the lsusb command or the USB devices list in Tools --> System devices in the webgui. Copied from USB Devices: USB Devices Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 014 Device 002: ID 1b1c:0c03 Corsair Bus 014 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 013 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 016 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 015 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 008 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 012 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 012 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 011 Device 002: ID 0e6f:0213 Logic3 Bus 011 Device 003: ID 046d:c22d Logitech, Inc. G510 Gaming Keyboard Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Do not pass through any USB devices in the VM template that is connected to the controller you want to pass through. I went ahead and removed all usb devices, which made the dang thing work! I've got full hot-swap capabilities on my USB 3.0 Ports. I'm going to attempt to add everything back one at a time and see if I can keep it, but honestly the whole reason I wanted this was just to be able to connect my externals so I could restore my stuff. Which version of unraid are you running? I'm on 6.1.6. Thanks again for your help, I really do appreciate it. If/when I'm more inclined to utilize a usb port full time I'll come back and report my results. Quote Link to comment
saarg Posted March 27, 2016 Share Posted March 27, 2016 If you have your external drives connected and stops, then starts the VM do you get the error? Quote Link to comment
psychofuzzie Posted March 30, 2016 Share Posted March 30, 2016 I didn't get the error again after restarting my VM. I even added all my devices back in one go, and it worked. Thank you again for your help! Quote Link to comment
saarg Posted March 30, 2016 Share Posted March 30, 2016 I didn't get the error again after restarting my VM. I even added all my devices back in one go, and it worked. Thank you again for your help! No problem. Good you got it working Quote Link to comment
bman Posted March 31, 2016 Share Posted March 31, 2016 Warning!!!: Please be VERY careful when doing this. You do NOT want to pass through your unRAID USB by mistake. unRAID needs the USB present to function properly. So if, in my messing around I DID do the above and my UnRAID system no longer works properly... how do I edit the XML from the command line? How do I find it to edit it? Quote Link to comment
ljm42 Posted April 7, 2016 Share Posted April 7, 2016 I finally got USB passthrough to work! Thought I'd document it for anyone else with an ASROCK E3C226D2I motherboard who is trying to boot an unRAID VM on an unRAID host per CHBMB's instructions: https://www.linuxserver.io/index.php/2015/12/14/creating-an-unraid-virtual-machine-to-run-on-an-unraid-host/ The biggest problem was the bios. Everything fell into place once I installed bios 3.30 and BMC 00.22.00 from here: http://www.asrockrack.com/general/productdetail.asp?Model=E3C226D2I#Download Until I did that, it was impossible to isolate the USB controllers - everything appeared on one controller regardless of where it was physically plugged in. I also bought this: http://smile.amazon.com/StarTech-Motherboard-4-Pin-Header-USBMBADAPT/dp/B000IV6S9S and installed it on one of the internal USB headers. My VM's flash drive is plugged in to that, while all the external USB ports go to the host. (I'm actually not sure which controller the built-in internal USB Type A port is connected to, once I got a working config I didn't go back and check that.) This is the modification I made to syslinux to stub out the appropriate USB controller: label unRAID OS menu default kernel /bzimage append pci-stub.ids=8086:8c2d initrd=/bzroot label unRAID OS Safe Mode (no plugins) kernel /bzimage append pci-stub.ids=8086:8c2d initrd=/bzroot unraidsafemode And here is the corresponding xml change: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/> </source> </hostdev> Everything else you need is in CHBMB's blog post. Note: there is still one problem I haven't been able to figure out... when I boot the host, I get this error: An operating system wasn't found. Try disconnecting any drives that don't contain an operating system. Press any key to restart. Once I press a key it goes to the normal unraid boot menu. It seems to be trying to boot off the vm's flash drive, and none of my bios tweaking has managed to prevent that. --- It occurs to me that this is a lot of pain to go through just because unRAID requires the USB drive to have the label "UNRAID". It would be much easier if it could follow this logic: If a USB drive labeled UNRAID_VM exists, and there is no USB drive labeled UNRAID, then mount the UNRAID_VM drive as UNRAID and continue booting. This would allow the host to boot normally, because a USB drive named UNRAID_VM won't cause any issues when one named UNRAID already exists. And the user would simply pass the UNRAID_VM drive to the guest, which would rename it to UNRAID and boot normally. Quote Link to comment
Recommended Posts
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.