Bluray Passthrough XenServer 6.2SP!

Joined
Feb 12, 2014
Messages
5
Hello

I'm fairly new to the world of virtualization and I tested quite a bit of different systems from ESXi to Proxmox etc. but was most pleased with the current XenServer 6.2SP1. I got it working fine on the following machine:

AsRock B85M Pro4
Intel i5 Haswell
16GB of Ram
120GB SSD Drive for XenServer and the VMs
internal HD4600 VGA
AMD Radeon 6450 VGA
LG Bluray Writer

I'm running a Windows 8.1 VM on it that gets a set of USB ports, the Radeon VGA and the Radeon HDMI Sound through passthrough. Everything about that works just fine.

The problem now, as I want it to be a media player, is on how to get the Bluray Writer passed through. If I check with lspci the mainboard only lists one SATA controller with 6 ports. So if I pass that through XenServer wouldnt have access to the SSD where it is anymore I suppose.

I can put blurays in fine and then active the drive through XenCenter but that is cruel as I would always have to use a second pc if I wanted to watch a movie. The second problem is that AnyDVD doesnt even recognize the virtual drive and I cant install the LG bluray software because it tells me that there is no lg bluray drive.

So is there any possibility to just pass on 1 to 1 the Bluray Writer to the Windows VM?

What I achieved is that I passed through a SATA Harddrive that is installed in the server for the VM to access with the method described here:
http://techblog.conglomer.net/sata-direct-local-disk-access-on-xenserver/

The problem I have with the Bluray Writer is that I dont know what I should use for the device id (it is not a sd* device) and I think I first have to take it away from XenServer as it already is under "DVD Drives" in XenCenter.

Another problem I have is that it sometimes looses my PCI passthrough options after a reboot. Sometime the Radeon HDMI Audio is there in Windows and sometimes not.

Thanks a lot
 
If you run the command
Code:
lspci
on dom0 it'll list all the pci devices that can be passed though. Typically it would have to be an entire disk controller if you want to give a guest an sata device. If you're lucky your motherboard might have more than one controller.

As to hdmi audio I think it's because it's technically a separate pci device. In my case:

Code:
[root@big-red ~]# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD/ATI] RD990 I/O Memory Management Unit (IOMMU)
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port D)
00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port H)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)
00:15.1 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1)
00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cayman PRO [Radeon HD 6950]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cayman/Antilles HDMI Audio [Radeon HD 6900 Series]
02:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
02:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
03:00.0 USB controller: Etron Technology, Inc. EJ188/EJ198 USB 3.0 Host Controller
06:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
06:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)

Ive noticed on the first boot of my Windows 7 guest video:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cayman PRO [Radeon HD 6950]​
is passed though but I have to restart the vm to get:
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cayman/Antilles HDMI Audio [Radeon HD 6900 Series].​

I haven't done it, but I suspect if you manually passed the audio device though you wouldn't have the audio problem. Personally I find booting and then rebooting the vm to just be less work.
 
I fixed the Audio Problem. It seems Xen just didnt like me hiding the USB first and then the Audo...

It works now but I will see how it happens after the restart.

I only have one controller for all six ports

Code:
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) (prog-if 01 [AHCI 1.0])
        Subsystem: ASRock Incorporation Device 8c02
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 1277
        I/O ports at f0d0 [size=8]
        I/O ports at f0c0 [size=4]
        I/O ports at f0b0 [size=8]
        I/O ports at f0a0 [size=4]
        I/O ports at f060 [size=32]
        Memory at f0832000 (32-bit, non-prefetchable) [size=2K]
        Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [70] Power Management version 3
        Capabilities: [a8] SATA HBA v1.0
        Kernel driver in use: ahci
        Kernel modules: ahci

The passthrough of the SATA HD worked flawless. So I think there has to be an option to pass on the DVD/Bluray drive in the same fashion.
 
If I understand correctly what your doing with the hard disk, it isn't exactly passthough. Dom0 still owns the hard drive (and the controller of course) it's just presenting a block device to the guest that happens to be the size of the entire disk. I don't think you could do something like that with your DVD/Bluray drive.

Now you could give the Xenserver forums a try they might have some sort of work around, but I think the best option would be to get a cheap pcie 1x controller and pass it though.
 
Why would you have to use a second computer? Why not just put XenCenter on the workstation you're trying to mount the Blueray to?

XenCenter isn't like vCenter, it can be installed on and used on many computers at the same time.

I would imagine with some creativity you could script it and just put something on the desktop to automatically mount the drive to that guest.

I'm almost positive that XenCenter comes with command line tools to execute commands on the XenServer.
 
Last edited:
xe cd-list
xe vm-cd-insert uuid="uuid" cd-name="whatever"
xe vm-cd-eject uuid="uuid"

I missed the second part about the software not seeing the virtual drive. That I'm not sure about :) sorry.
 
I made some little progress yesterday.

I got "sr0" as device name for my Bluray Writer and through this tutorial:

http://support.citrix.com/article/CTX131328

I removed it from the Xen host and told it to forget it.

I then used this tutorial to add it as a removable storage device like the SATA HD

http://techblog.conglomer.net/sata-direct-local-disk-access-on-xenserver/

I then could attach it to the Win8.1 VM. BUT now the VM wont start. I think the problem is that the second uudev thing is just geared towards HDs and not optical drives. After I detach it again the VM boots normal.

The thing is I haven't found a Bluray Player software that will play from a virtual drive, I suspect this is because of AACS reasons. I tried AnyDVD HD which should handle this problem it doesnt even recognize the drive is there, even with the aggressive drive discovery enabled.
 
Yeah...I hate trying to play Blurays through a computer...that's why I have a PS3 or I just rip it.
 
Yeah that would be far easier, but the easy bluray playback and everything in one box in the living room was the big selling point to the misses ;) So I better deliver on it...

Does anybody know if it works with Hyper-V or ESXi?
 
Got it working with VMWare ESXi 5.5. AnyDVD now plays nice with the patched through BD Drive.

But now VGA passthrough doesnt work ;) It seems I cant catch a brake.

Whenever I passthrough the AMD or the internal HD4600 windows just wont start.
 
Have you considered picking up an inexpensive compatible SATA card and passing that through with XenServer? Even if it had to be a M1015/9201-8i/etc.
 
Most sata cards do not have support for optical media. You will want to check before you hand over any money for a card.
 
Back
Top