Hi, i am new to Unraid and this is consequently my first post.
I first describe my usecase:
I have an i7 Desktop tower with Asrock X79-Professional Motherboard and 2 graphic cards (GTX670, GTX 730). My main goal is so setup a Virtual machine without internet connection but 3D-Acceleration for productive CAD-Workflow. This shall be achieved by setting up 2 VMs: one main VM (passthrough GTX670 for Gaming, Internet, Video and stuff) and the second VM (for work related stuff, passthrough to GTX730) which is accessed over RDP (both VMs shall run Win8.1)
My main VM shall have access to all the USB-Connectors/Devices.. in the end it should behave like a bare metal PC capable of connecting to the other VM. My dream is to have an experience close to running bare metal windows plus access to a VM that has 3D support. (currently bare metal installed windows + VirtualBox doesnt cut it)
I have trouble setting up the first VM. I managed to install Win8.1 but the USB-stuff is just not working. It is extremely difficult even to specify what the problems are...
For now i just checked all USB-Devices in the VM-Config so i have access to them.. but not all devices are working including my mouse..
here are some of the Log-Statements:
2016-07-01T21:11:47.019806Z qemu-system-x86_64: libusb_set_configuration: -6 [bUSY]
This does not happen, if i connect a 2nd Keyboard to the machine. With only one Keyboard connected it seems that the commandline (which starts on a monitor connected to the GTX730) of unraid uses the keyboard at the time the VM starts up... after i shut down the VM i can not type anything into the command line (..eg. to login) again. But if i restart the VM the keyboard can be accessed by the VM without that warning.
Other problems are:
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28 <--- happens a lot
qemu-system-x86_64: hw/usb/core.c:551: usb_packet_check_state: Assertion `!"usb packet state check failed"' failed.
and
2016-07-01T22:49:08.292864Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "USB2.0 Camera" (high speed) to bus "usb.0", port "2.5" (full speed)
..happens for a lot of usb devices.
when i remove a usb attachment:
2016-07-01T21:17:30.906405Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
And i am not able to reconnect the device without reboot.
I searched a lot and found topics about USB passthrough but honestly.. they were too complicated and without knowing what i do its really hard.
From my research however i learned that its not welcome to request help without posting at least the XML... so...
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>Coilbi Win8</name>
<uuid>68ec2472-add3-7717-b262-eac643e83d47</uuid>
<metadata>
<vmtemplate name="Custom" icon="windows.png" os="windows"/>
</metadata>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</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/disk1/Coilbi_Win8/vdisk1.img'/>
<target dev='hdc' bus='virtio'/>
<boot order='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/mnt/user/Image/Windows81Pro64.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/Image/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='0x03' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:c5:62:d8'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' 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/Coilbi Win8.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>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x1038'/>
<product id='0x1219'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x1038'/>
<product id='0x1212'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x046d'/>
<product id='0x0826'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x0c45'/>
<product id='0x7e0a'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x03eb'/>
<product id='0x2141'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x1871'/>
<product id='0x7670'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x1038'/>
<product id='0x1600'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x05e3'/>
<product id='0x0745'/>
</source>
</hostdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
</qemu:commandline>
</domain>
To troubleshoot i of course tried to eliminated troublesome USB devices. It turns out the only configuration that works without any usb related error is when i connect 2 keyboards to the machine and only check the 2nd keyboard to pass through to the VM.
I found resources like this: https://lime-technology.com/forum/index.php?topic=36768.0 which i cant follow because i am too fresh to linux...
i went so far that i seem to have 4 usb buses (USB2.0 -> 00:1a.0, 00:1d.0 USB3.0-> 07:00.0, 08:00.0) and my Unraid USB stick seems to be connected to Bus002 Dev003 ID 0781:5580... but what i do with that informtion... i dont know.
Others say that USB does not work in general until i insert a PCI-Card for it.. http://lime-technology.com/forum/index.php?topic=33391.0
On the other hand... one shall assign at least one usb mouse an keyboard if one uses GPU passthough..... if all main board usb connectors seem unusable by unraid this is a challenging request... i do heavily depend on usb.. :-(
Any ideas?
Is it manageable via XML or do i need to buy USB-Extension cards? (i have 2 free PCIe slots, i think)? Will my setup ever work?
Here is one complete startup log:
ErrorWarningSystemArrayLogin
2016-07-01 22:49:04.115+0000: starting up libvirt version: 1.2.18, qemu version: 2.3.0
LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name Coilbi Win8 -S -machine pc-i440fx-2.3,accel=kvm,usb=off,mem-merge=off -cpu host -m 8192 -realtime mlock=on -smp 4,sockets=1,cores=4,threads=1 -uuid 68ec2472-add3-7717-b262-eac643e83d47 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Coilbi Win8.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive file=/mnt/disk1/Coilbi_Win8/vdisk1.img,if=none,id=drive-virtio-disk2,format=raw,cache=writeback -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk2,id=virtio-disk2,bootindex=1 -drive file=/mnt/user/Image/Windows81Pro64.iso,if=none,id=drive-ide0-0-0,readonly=o=hostdev6 -device usb-host,hostbus=1,hostaddr=4,id=hostdev7 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -device ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1 -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on -msg timestamp=on
Domain id=1 is tainted: high-privileges
Domain id=1 is tainted: custom-argv
Domain id=1 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2016-07-01T22:49:06.143995Z Warning: speed mismatch trying to attach usb device "HD Webcam C525" (high speed) to bus "usb.0", port "2.2" (full speed)
2016-07-01T22:49:06.178554Z Warning: speed mismatch trying to attach usb device "Atmel-ICE CMSIS-DAP" (high speed) to bus "usb.0", port "2.4" (full speed)
2016-07-01T22:49:06.182053Z Warning: speed mismatch trying to attach usb device "USB2.0 Camera" (high speed) to bus "usb.0", port "2.5" (full speed)
2016-07-01T22:49:07.483595Z qemu-system-x86_64: libusb_set_configuration: -6 [bUSY]
2016-07-01T22:49:08.288239Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "HD Webcam C525" (high speed) to bus "usb.0", port "2.2" (full speed)
2016-07-01T22:49:08.289613Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "Atmel-ICE CMSIS-DAP" (high speed) to bus "usb.0", port "2.4" (full speed)
2016-07-01T22:49:08.292864Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "USB2.0 Camera" (high speed) to bus "usb.0", port "2.5" (full speed)
2016-07-01T22:49:10.300130Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "HD Webcam C525" (high speed) to bus "usb.0", port "2.2" (full speed)
2016-07-01T22:49:10.301586Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "Atmel-ICE CMSIS-DAP" (high speed) to bus "usb.0", port "2.4" (full speed)
2016-07-01T22:49:10.304837Z qemu-system-x86_64: Warning: speed mismatch trying to attach usb device "USB2.0 Camera" (high speed) to bus "usb.0", port "2.5" (full speed)
2016-07-01T22:49:45.467595Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:45.467630Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:45.467643Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:45.467655Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:45.467666Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/3-1.1/bConfigurationValue failed ret=-1 errno=2
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/004: No such file or directory
2016-07-01T22:49:47.477881Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:47.477910Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:49:47.477914Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/007: No such device
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/006: No such device
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/007: No such device
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/006: No such device
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/007: No such device
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/006: No such device
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=28
2016-07-01T22:50:45.198269Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
2016-07-01T22:50:45.198287Z qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/2-1.6.2/bConfigurationValue failed ret=-1 errno=2
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/006: No such file or directory
Interestingly the command line states "..-machine pc-i440fx-2.3,accel=kvm,usb=off," hmmh.