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.

VGA and USB Passthrough to Windows 8.1 VM

Featured Replies

I am struggling with trying to get the USB passthrough working.

I got the XFX ATI Radeon HD5450  working but I need to put the reboot scripts in to make it able to restart.

When I use TightVNC, I can use my remote PC mouse and keyboard to log in but as soon as I am logged in the keyboard does not detect anymore.

 

I tried passing through the USB controller but have had no luck detecting the keyboard or mouse on the VM.

 

These are what I have passed through:-

01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series]

01:00.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series]

 

This hangs the machine:-

00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)

 

This does not appear to detect the mouse or keyboard connected but passes through without issue:-

00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)

00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)

 

How do I confirm which ports are linked to which controller?

What happens if you passthrough the port controller that the unraid USB stick is connected to?

 

Upon further investigation:-

 

Only 2 of the 3 controllers are available.

00:1a.0

00:14.0

 

ls -la /sys/bus/usb/devices/usb*
lrwxrwxrwx 1 root root 0 Mar  9 22:07 /sys/bus/usb/devices/usb1 -> ../../../devices/pci0000:00/0000:00:1a.0/usb1/
lrwxrwxrwx 1 root root 0 Mar  9 22:07 /sys/bus/usb/devices/usb2 -> ../../../devices/pci0000:00/0000:00:14.0/usb2/
lrwxrwxrwx 1 root root 0 Mar  9 22:07 /sys/bus/usb/devices/usb3 -> ../../../devices/pci0000:00/0000:00:14.0/usb3/

 

The Unraid USB stick is stuck in 00:14.0

/sys/block/sda -> ../devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/host0/target0:0:0/0:0:0:0/block/sda/

 

It would be great if I could run lsusb but I don't think the "usbutils" package is included with UNRAID, is there a way I can install it, it would be helpful in this new world of XEN and UNRAID.

 

My strategy now is to change ports with the UNRAID usb stick to determine the port  IDs and the controller it is connected to.

Someone tell me if there is another way.

 

ls -la /sys/block/sd*
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sda -> ../devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/host0/target0:0:0/0:0:0:0/block/sda/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdb -> ../devices/pci0000:00/0000:00:1f.2/ata1/host2/target2:0:0/2:0:0:0/block/sdb/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdc -> ../devices/pci0000:00/0000:00:1f.2/ata2/host3/target3:0:0/3:0:0:0/block/sdc/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdd -> ../devices/pci0000:00/0000:00:1f.2/ata3/host4/target4:0:0/4:0:0:0/block/sdd/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sde -> ../devices/pci0000:00/0000:00:1f.2/ata4/host5/target5:0:0/5:0:0:0/block/sde/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdf -> ../devices/pci0000:00/0000:00:01.2/0000:02:00.0/host1/port-1:0/end_device-1:0/target1:0:0/1:0:0:0/block/sdf/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdg -> ../devices/pci0000:00/0000:00:01.2/0000:02:00.0/host1/port-1:1/end_device-1:1/target1:0:1/1:0:1:0/block/sdg/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdh -> ../devices/pci0000:00/0000:00:01.2/0000:02:00.0/host1/port-1:2/end_device-1:2/target1:0:2/1:0:2:0/block/sdh/
lrwxrwxrwx 1 root root 0 Mar  9 21:07 /sys/block/sdi -> ../devices/pci0000:00/0000:00:01.2/0000:02:00.0/host1/port-1:3/end_device-1:3/target1:0:3/1:0:3:0/block/sdi/

 

My LSPCI output

00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06)
00:01.2 PCI bridge: Intel Corporation Haswell PCI Express x4 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)
00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation Lynx Point High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #4 (rev d5)
00:1c.5 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #6 (rev d5)
00:1c.7 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #8 (rev d5)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 05)
01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series]
01:00.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series]
02:00.0 SCSI storage controller: Marvell Technology Group Ltd. MV64460/64461/64462 System Controller, Revision B (rev 01)
04:00.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 06)
05:00.0 Ethernet controller: Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller (rev 13)
06:00.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 06)
07:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

 

 

  • CaseLian Li Armoursuit PC-P50
  • CPUIntel i5-4440, 3.1 GHZ, 6MB Cache, LGA1150
  • MotherboardMSI Z87-GD65 - Chose this board due to the large amount of PCI Express slots and no legacy components
  • GPU
    • XFX ATI Radeon HD5450 650M 1GB DDR2 HDMI DVI VGA
    • Intel Haswell Integrated Graphics Controller 4600

    [*]RAM 16GB DDR3

    [*]PSU XFX XXX Edition - XPS 650 Watts - Seasonic OEM platform

    [*]HBA / SAS Card Supermicro SAS-AOC-SASLP-MV8

    [*]NIC(s)

    • 2 x Realtek 8169 based D-Link System Inc DGE-528T Gigabit Ethernet Adapter - PCI Express x1
    • 1 x Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller - Onboard

    [*]Hard drives unRAID array

    • Seagate 1.5TB ST31500341AS - Parity - Onboard 6-port SATA Controller
    • Western Digital 640GB WD6400AAVS - Data - Onboard 6-port SATA Controller
    • Western Digital 1TB WD10EADS - Data - Supermicro SAS-AOC-SASLP-MV8
    • Seagate 1TB ST31000340AS - Data - Supermicro SAS-AOC-SASLP-MV8
    • Hitachi 250GB HDT725032VLA360 - Data - Supermicro SAS-AOC-SASLP-MV8
    • Western Digital 500GB WD5000AADS - Data - Onboard 6-port SATA Controller
    • Seagate 80GB ST380815AS - Data - Onboard 6-port SATA Controller

    [*]Hard drives NON array

    • Seagate 250GB ST3250318AS - NON-ARRAY - Supermicro SAS-AOC-SASLP-MV8

 

Brief description of VMs and use cases

 

Dom0 - unRAID

DomU1 - 2vcpus / 2GB RAM - Arch Linux VM Appliance -- no use defined yet

DomU2 - 4vcpus / 8GB RAM - Windows 8.1 main desktop / gaming VM

Lovely detailed post. Except you for you forgot to say which OS you're trying to pass your GPU through too!

 

If you haven't already take a look at the half stub post I wrote on setting up a windows VM.

 

Usbutils is coming in beta4 soon.

 

Sent from my S4 via Tapatalk

 

  • Author

I updated the subject to reflect the VM OS I am trying to passthrough to.

 

The VGA passthrough works, but because I cannot properly access the machine using a keyboard and mouse I cannot setup the reboot scripts you detail on your blog.

 

I tested all the USB ports on the motherboard and they all point back to the same controller using the method I detailed above.

I still have a USB3.0 header on the motherboard for which I have no connector, I will buy one today to test again tonight.

 

I will also get an additional PCI Express x1  USB3 controller to install in case that port is mapped to the same controller.

Great. You are very close, keep the faith.

 

Once you have the USB issue resolved then you are golden. It's a very motherboard specific issue to resolve but it sounds Like you've gone the right route with an add in card.

 

Sent from my S4 via Tapatalk

 

 

  • Author

So I got it working !!! BUT!!!

 

I plugged the USB3 Ports into the motherboard USB Header port and I still got the same controller.

So the lesson is that even though the LSPCI command shows 3 controllers:-

 

00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)

00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)

00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)

 

All the ports are  managed by a single one - 00:14.0

 

I added a PCI Express x1 - 2xPort USB3 Controller to the motherboard

 

07:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

 

I plugged my UNRAID USB into the new controller and passed through the onboard controllers

 

syslinux.cfg

xen-pciback.hide=(01:00.0)(01:00.1)(00:14.0)(00:1a.0)(00:1d.0)

 

win81.cfg

pci = ['01:00.0','01:00.1','00:14.0','00:1a.0','00:1d.0']

 

And it worked

 

Here is where the but comes in......

 

 

I could log in using my keyboard and the mouse works, but after the login screen I cannot type. This is the same symptom I has when I was using TightVNC.

 

Has this got to do with settings in the cfg file?

 

Could it be the usbdevice = 'tablet' setting?

 

Here is my config file:-

 

name = 'windows'
builder = 'hvm'
vcpus = '4'
memory = '8192'
device_model_version="qemu-xen-traditional"
disk = [
        'phy:/mnt/disk/vms/Win81VM/win81.img,hda,w',
#        'phy:/dev/cache/secondexample/example.img,hdb,w',
        'file:/mnt/disk/vms/ISOS/win81pro.iso,hdc:cdrom,r'
]
vif = [ 'mac=00:16:3E:51:20:4C,bridge=br0,model=e1000' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
boot = 'dc'
acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci='1'
sdl = '0'
vnc = '1'
vnclisten = '0.0.0.0'
vncpasswd = ''
stdvga = '0'
usb = '1'
usbdevice = 'tablet'
pci = ['01:00.0','01:00.1','00:14.0','00:1a.0','00:1d.0']

Hi segaboys

 

I had a pretty similar experience setting up USB to my Windows VMs. I could not get USB controllers to pass through reliably and not all attached devices would show up in the guest OS.

 

I ended up dumping PCI passthrough and instead just going with USB passthrough.

 

First step is to install USBUtils which is helpfully outlined at the end of this thread;

 

http://lime-technology.com/forum/index.php?topic=7285.msg71742#msg71742

 

(it will be built in to b4)

 

Then, having enumerated and identified your devices, you need to set up your .cfg file something like this;

 

name = 'TV1'
builder = 'hvm'
vcpus = '2'
memory = '3072'
device_model_version="qemu-xen-traditional"
disk = [
        'file:/mnt/user/Xen/win8_TV1.img,hda,w' 
   
]
vif = [ 'mac=00:16:3E:51:20:4D,bridge=xenbr0,model=e1000' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
boot = 'c'
acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci='1'
sdl = '0'
vnc = '0'
vnclisten = '0.0.0.0'
vncpasswd = ''
vncdisplay = 1
stdvga = '0'
usb = '1'
usbdevice=[ 'host:07d1:f101' , 'host:0603:00f2' , 'host:2222:2051' , 'host:147a:e03e' ]
pci = ['05:00.0','05:00.1']

 

You can see there how it's possible to list USB devices in much the same way as you do PCI devices.

 

A note of caution; these IDs can and do change if you unplug devices and reattach them, especially to different ports. However, I've found this to be a much more reliable means of getting USB to work in my particular config.

 

For example, in the above, I've passed through a wired keyboard and mouse, a wireless bluetooth adapter and an infrared receiver. All work great.

 

The other advantage is that by passing through individual devices, you're not binding a full set of ports (on a controller) to a specific VM and so have a lot more flexibility.

 

While I didn't try too hard, I couldn't get USB3 to work using this means.

 

See my blog for more details of my unXen trials & tribulations.

 

Peter

  • Author

I ran :-

 

wget http://slackware.cs.utah.edu/pub/slackware/slackware-12.1/slackware/a/usbutils-0.73-i486-2.tgz -O /tmp/lsusb.tgz;installpkg /tmp/lsusb.tgz

 

and it installed fine:-

 

--2014-03-11 20:42:31--  http://slackware.cs.utah.edu/pub/slackware/slackware-12.1/slackware/a/usbutils-0.73-i486-2.tgz
Resolving slackware.cs.utah.edu (slackware.cs.utah.edu)... 155.98.64.87
Connecting to slackware.cs.utah.edu (slackware.cs.utah.edu)|155.98.64.87|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 157260 (154K) [application/x-gzip]
Saving to: ‘/tmp/lsusb.tgz’

100%[==================================================================================================================>] 157,260     52.0KB/s   in 3.0s

 

 

But when I try and run it

 

/sbin/lsusb: cannot execute binary file

 

This is because its a 32bit and the current build is 64bit?

 

The following command installs it on Unraid 6.0 Beta 3

 

wget http://slackware.cs.utah.edu/pub/slackware/slackware64-14.1/slackware64/a/usbutils-007-x86_64-1.txz -O /tmp/lsusb.txz;installpkg /tmp/lsusb.txz

 

 

After I removed the USB controllers from syslinux.cfg and win81.cfg I get the following

 

root@Tower:/tmp# lsusb
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 002: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard
Bus 005 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 003: ID 0461:4d20 Primax Electronics, Ltd HP Optical Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 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 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

My bad for pointing to the 32 bit install, I'd done mine from another thread that I couldn't find on search - glad to see you figured it out!

 

So, based on your lsusb output, if you add the following to your win81.cfg, you should have keyboard & mouse passthrough;

 

usbdevice=[ 'host:04b3:3025' , 'host:0461:4d20'  ]

 

Let us know if that works for you...

 

Peter

  • Author

So I have come to the conclusion that both USB device and pci pass-through works on my machine.

 

PCI pass-through works  very well, I have installed a new 2x port USB3 PCI-express x1 card and can passthrough the whole controller ports to the guest operating system.

When I unplug and plug in any device the windows 8.1 guest detects, which is part of my overall design in the future, I plan to run HDMI over ethernet  and extend the USB cable to a multiport USB hub to a monitor in another room.

 

However, the windows 8.1 ISO image (created from a Retail Windows 8.1 DVD), which I used to create the guest machine installs well, mouse and keyboard works.

As soon as windows has completed the install and I log in using the keyboard, when I get to the windows desktop the keyboard stops working.

 

I get this in the case of [VGA controller pass-through + USB controller pass-through] / [VGA controller pass-through  + USB device pass-through] / [VNC virtualized VGA + virtualized USB].

 

Not really sure how to try and fix this and these are some of the things I will look into:-

 

  • Check bios settings for USB - legacy etc....
  • Try another OS with VGA pass-through to check if its specific to Win 8.1

 

If anyone has anymore suggestions of how to tackle this, it would be appreciated.

 

Archived

This topic is now archived and is closed to further replies.

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.