Hyper-V Discrete Device Assignment (DDA) with a TV Tuner (Hauppauge HVR-4400)

System Requirements:

  • Windows Server 2016
  • Hauppauge HVR-4400 PCIe Tuner

The Problem:

I am a DVBLink user. DVBLink does not play nicely with Windows Service and consequently it wants to run on a client OS. This means that I have lots of server hardware running server Operating Systems and one device with 4 TV Tuners in it running Windows 10.

With the release of Windows Server 2016 came the promise of VMWare like PCIe Pass-through, allowing physical devices on the PCI bus to be attached to VMs. The plan is to attach the PCIe TV Tuner and attempt to get DVBLink working in a VM so that the physical unit can be decommissioned (saving the power bill).

More Info

As part of the process, I was considering building a new server at the start of 2017 to perform a consolidation against. The Windows 10 DVBLink machine would be one consolidated devices onto more powerful modern hardware. I would also need new TV Tuners as only 2 of the 4 in the DVBLink TV Server is PCIe, the rest are PCI. Again, there are opportunities to consolidate that into fewer PCIe devices too.

The driver for the new server was Hyper-V PCIe Pass-through, or “Discrete Device Assignment” (DDA) as Microsoft are calling it. It is however quite difficult to find out whether BIOS firmware supports the proper implementations of I/O-MMU VT-d to permit it, making the purchase a risk. Equally, there is no guarantee that DDA will work with a TV Tuner.

Consequently, I decided to borrow a dual CPU Dell PowerEdge R630 to perform the experiment as there were several reports on-line that the R6xx and R7xx have the proper VT-d and SR-IOV feature set for this type of activity. Well done Dell (why don’t you advertise this?!).

After updating firmware, adding the TV Tuner and installing Windows Hyper-V Server 2016 on the machine, the first step was to – as an experiment – attempt to install the TV Tuner drivers on Windows Server 2016 (which errored). After that it was time to run the DDA Survey Script from Microsoft.

Download: DDA Survey Script (GitHub)

 

This was promising. The script found two devices that it stated were capable of being used with DDA

PERC H730 Mini
Express Endpoint -- more secure.
And its interrupts are message-based, assignment can work.
PCIROOT(0)#PCI(0100)#PCI(0000)

and

Hauppauge WinTV HVR-4400 (Model 121xxx, Hybrid DVB-T/S2, IR)
Express Endpoint -- more secure.
And it has no interrupts at all -- assignment can work.
PCIROOT(0)#PCI(0200)#PCI(0000)

The next step was to dismount the device from the Hypervisor and make it available to Hyper-V

# Find the HVR-4400
$pnpdevs = Get-PnpDevice -PresentOnly | Where-Object {$_.Class -eq "Media"} | Where-Object {$_.Service -eq "HCW85BDA"}# ... or if you know the hardware ID
$pnpdevs = Get-PnpDevice -PresentOnly | Where-Object {$_.InstanceId -eq "PCI\VEN_14F1&DEV_888
0&SUBSYS_C1080070&REV_04\4&39CDA168&0&0010"}foreach ($pnpdev in $pnpdevs) {
Disable-PnpDevice -InstanceId $pnpdev.InstanceId -Confirm:$false
Write-Host 'Device ' $pnpdev.InstanceId ' Disabled. NOTE: If this hangs, reboot and try again'
$instanceId = $pnpdev.InstanceId
$locationpath = ($pnpdev | get-pnpdeviceproperty DEVPKEY_Device_LocationPaths).data[0]
Write-Host 'Dismounting Device At: ' $locationpath ' (' $instanceId ')'
Dismount-VmHostAssignableDevice -locationpath $locationpath
Write-Host $locationpath
}

Initially, it hung PowerShell (and the system) so I had to hard reset the server. In this instance it was in fact necessary to reboot after issuing

Disable-PnpDevice

After trying again and rebooting the Dismount-VmHostAssignableDevice failed with

dismount-vmhostassignabledevice : The operation failed.
The manufacturer of this device has not supplied any directives for securing this device while exposing it to a
virtual machine. The device should only be exposed to trusted virtual machines.
This device is not supported when passed through to a virtual machine.
The operation failed.
The manufacturer of this device has not supplied any directives for securing this device while exposing it to a
virtual machine. The device should only be exposed to trusted virtual machines.
This device is not supported and has not been tested when passed through to a virtual machine. It may or may not
function. The system as a whole may become unstable. The device should only be exposed to trusted virtual machines.
At line:1 char:1

It would not proceed past this point. The trick was to change the line to

Dismount-VmHostAssignableDevice -locationpath $locationpath -Force

The next step was to ensure that the VM’s Automatic Stop Action was set to anything other than “Save”

Set-VM -Name “10-TEST” -AutomaticStopAction Shutdown

… and at this point it was simply a case of creating a VM and assigning the device

Add-VMAssignableDevice -LocationPath “$locationpath” -VMName “10-Test”

At which point the device immediately popped up in Device Manager under Windows 10 in the Generation 2 VM

DDA PCIe Passthrough in Device Manager

…. before the VM blue screened a few seconds later.

Blue Screen of Death

I tried to use several versions of the HVR-4400 driver that I could find and it made no difference. The VM would crash whenever it attempted to talk to the card. The Hypervisor itself did not seem to be impacted by the Blue Screen event and itself did not crash.

I also tried fully removing the device from the Hypervisor using DEVCON and clearing out the driver using pnputil. Superficially, this action made it worse as the VM wouldn’t boot at all now if it had a driver on-file for the TV Tuner. Before it would at least boot.

So this project was a failure and I will not be investing in new server hardware just yet. I’ll wait to see if Microsoft improve the feature set as allegedly this type of insanity (and yes, it is insane) is possible in VMWare. I do not want to change away from Hyper-V at the current time though, so I will have to stick with a client machine as a service.

This does not mean of course that this cannot work in Hyper-V. The HVR-4400 is a card from 2011/2012. So it is not exactly new hardware. PCIe TV Tuners designed to modern electrical standards and for use on PCIe 3.0 bus architectures may provide better interoperability out of the box. I just don’t have any other cards to test with and am in a bit of a chicken and egg situation over wanting to invest in new cards and servers unless I know they will work nicely together.

If you are interested in this too and would like me to have a go testing your hardware, please get in touch via HPC:Factor.

Creating a Windows XP Service Pack 3 Integrated CD for Windows XP Media Center Edition

System Requirements:

  • Windows XP Media Center Edition 2004
  • Windows XP Media Center Edition 2005

The Problem:

When you create a slipstreamed installation media for Windows XP Media Center Edition you receive the following error message at approximately “26 minutes” until completion during the Windows XP Professional Edition setup routine.

Files Needed
The file ‘ehiEPG.dll’ on Windows XP Professional CD 2 is needed.
Type the path where the file is located, and then click OK.

Slipstream ehiEPG.dll error

If you check the installation media, the file does not exist and you will be unable to install the Media Centre module with the Windows XP installation.

More Information:

If you check the Windows XP Slipstreamed Media, you will not be able to find the file ehiEPG.dll or ehiEPG.dl_ on the disc set. If you are looking for a short answer to your problem, here it is:

  • Windows XP Media Center 2004 – You can slipstream
  • Windows XP Media Center 2005 – You cannot slipstream

 

This one took me a frustratingly large amount of time to work out, but here is a rundown of how I have come to this conclusion.

 

When you slipstream XP SP3 onto Tablet PC Edition Media (which is the same as the MCE media minus the Sonic and Plus CAB’s), the Tablet PC components on CD 2 are updates as part of the slipstream. When you perform the same action on a MCE 2005 media set, no changes are made to the cmpnents\mediactr\i386 folder on disc 2.

So what about this ehiEPG.dll file?

The Media Centre installer is conducted through a sub-file in the i386 folder called: MEDCTROC.IN_

if you expand this file before you perform the slipstream with SP3 (using expand <path>\MEDCTROC.IN_ c:\MEDCTROC.INI) and then do the same after the slipstream you will come up with a completely different set of results (shown in the table below).

MCE 2005 SP2 (Microsoft) MCE 2005 SP3 (Slipstreamed)
Arch.jpg Arch.jpg
AspectRatio16x9.wmv = 1 AspectRatio16x9.wmv =1
AspectRatio4x3.wmv = 1 AspectRatio4x3.wmv =1
bdatunepia.dll = 1 bdatunepia.dll = 1
bdatunepia.ldo = 1 bdatunepia.ldo = 1
BigWave.jpg = 1 BigWave.jpg = 1
Brightness.wmv = 1 Brightness.wmv =1
CBVAFilter.dll = 1
ColorTint.wmv = 1 ColorTint.wmv =1
Contrast.wmv = 1 Contrast.wmv =1
DebugSvc.dll = 1 DebugSvc.dll = 1
down_gem.png = 1 down_gem.png = 1
down_otto.png = 1 down_otto.png = 1
ehchsime.dll = 1 ehchsime.dll = 1
ehCIR.dll = 1 ehCIR.dll = 1
ehCIR.ird = 1 ehCIR.ird = 1
ehcir.ldo = 1 ehcir.ldo = 1
ehCIRcl.dll = 1
EhCM.dll EhCM.dll
ehcm.ldo ehcm.ldo
ehcommon.dll = 1 ehcommon.dll = 1
ehcommon.ldo = 1 ehcommon.ldo = 1
EhDebug.dll = 1 EhDebug.dll = 1
ehdrop.dll = 1 ehdrop.dll = 1
ehentt.dll = 1 ehentt.dll = 1
ehepg.dll = 1 ehepg.dll = 1
ehepg.ldo = 1 ehepg.ldo = 1
ehepgdat.dll = 1 ehepgdat.dll = 1
ehepgdat.ldo = 1 ehepgdat.ldo = 1
ehepgdec.dll = 1 ehepgdec.dll = 1
ehepgnet.dll = 1 ehepgnet.dll = 1
ehGLID.dll = 1 ehGLID.dll = 1
ehiEPG.dll = 1
ehiepg.ldo = 1
ehiExtens.dll = 1 ehiExtens.dll = 1
ehiMsgr.dll = 1
ehIntro.wmv = 1 ehIntro.wmv =1
ehiPlay.dll = 1 ehiPlay.dll = 1
ehiplay.ldo = 1 ehiplay.ldo = 1
ehiProxy.dll = 1 ehiProxy.dll = 1
ehiproxy.ldo = 1 ehiproxy.ldo = 1
ehiTuner.dll = 1
ehituner.ldo = 1
ehiuserxp.dll = 1 ehiuserxp.dll = 1
ehiuserxp.ldo = 1 ehiuserxp.ldo = 1
ehiVidCtl.dll = 1 ehiVidCtl.dll = 1
ehividctl.ldo = 1 ehividctl.ldo = 1
ehiwmp.dll = 1 ehiwmp.dll = 1
ehiwmp.ldo = 1 ehiwmp.ldo = 1
ehiwuapi.dll = 1
ehjpnime.dll = 1 ehjpnime.dll = 1
ehkeyctl.dll = 1
ehmsas.exe = 1 ehmsas.exe = 1
ehPlayer.dll = 1 ehPlayer.dll = 1
ehProxy.dll = 1 ehProxy.dll = 1
ehRec.exe = 1 ehRec.exe = 1
ehRecObj.dll = 1 ehRecObj.dll = 1
ehrecobj.ldo = 1 ehrecobj.ldo = 1
ehRecvr.exe = 1
ehres.dll = 1 ehres.dll = 1
ehreschs.dll = 1 ehreschs.dll = 1
ehresde.dll = 1 ehresde.dll = 1
ehresfr.dll = 1 ehresfr.dll = 1
ehresit.dll = 1
ehresja.dll = 1 ehresja.dll = 1
ehresko.dll = 1 ehresko.dll = 1
ehresnl.dll = 1
ehSched.exe = 1 ehSched.exe = 1
ehshell.exe = 1 ehshell.exe = 1
ehshell.ldo = 1 ehshell.ldo = 1
ehsqdb20.dll = 1 ehsqdb20.dll
ehsqqp20.dll = 1 ehsqqp20.dll = 1
ehsqse20.dll = 1 ehsqse20.dll = 1
ehtray.exe = 1 ehtray.exe = 1
ehui.dll ehui.dll
ehuihlp.dll = 1 ehuihlp.dll = 1
EpgTOS.txt = 1
Fish.jpg Fish.jpg
Freestyl.jpg = 1 Freestyl.jpg = 1
gacutil.exe = 1
GEMMAS~1.MCL = 1 GEMMAS~1.MCL =1
mcdftreg.inf = 1 mcdftreg.inf = 1
MCETuningOverrides.xml = 1
mcrmgr.dll = 1
mcrmgr.exe = 1
mcskin.wmz = 1 mcskin.wmz = 1
medcthlp.cab = 1 medcthlp.cab = 1
medctrro.exe = 1 medctrro.exe = 1
Microsoft.MediaCenter.dll = 1
Otto.mcl Otto.mcl =1
Positioning16x9.wmv = 1 Positioning16x9.wmv =1
Positioning4x3.wmv = 1 Positioning4x3.wmv =1
PositioningOS16x9.wmv = 1
PositioningOS4x3.wmv = 1
RegisterMCEApp.exe = 1
RGBBalance.wmv = 1 RGBBalance.wmv =1
Rio.jpg = 1 Rio.jpg = 1
segmcr.ttf = 1
segmcsb.ttf = 1
Sharpness.wmv = 1 Sharpness.wmv =1
snchk.exe = 1
SS2.dvr-ms = 1
SS51.dvr-ms = 1
winxpfs.jpg = 1 winxpfs.jpg = 1
WMM2DVR.DLL = 1
WMM2ERES.dll = 1
WMM2EXT.dll = 1
WMM2FXPZ.DLL = 1
WMM2FXPZ.XML = 1

 

The differences between the two installation file sets is quite clear, there are many files missing from the SP3 installer list and a hand full of files are new on the SP3 list. The presence of new file is however understandable because of new files included in hot fixes to Media Centre Edition since XP SP2 was released in 2004. Where are the files though?

Extracting the SP3 installer reveals the files to be located within the Service Pack hierarchy in the location:
\i386\root\cmpnents\mediactr\i386

My mistake here was not examining the files closer, because I assumed that perhaps there had been an issue with the slipstream script and the files had not been copied across to the delivery folder for disc 2 during the slipstream.

To test this theory, I halted the Virtual Machine that I had asking me for ehiEPG.dll, copied the contents of service pack \i386\root\cmpnents\mediactr\i386 into \cmpnents\mediactr\i386 of my slipstreamed build folder and recreated the disc 2 ISO image.

Sure enough, the Virtual Machine installation took one look at the disc and was suddenly happy again. Sounds good?

So I abandoned the install and started again to ensure that I was not mixing file versions. The install got to 26 minutes, no problems, the install got to 10 minutes, no problems. The install came up with OOBE and still no problems.

On the start menu there was Media Center link and in clicking it the MCE initiator grumbled about the graphics card not being compatible with MCE (this was Virtual PC after all) but sure enough, MCE loaded.

I immediately hit Windows Update and was offered nothing more than:

  • Internet Explorer 7.0
  • Windows Malicious Software Removal Tool May 2008
  • 923789 – Update for Adobe Flash Player

So it looked like it had worked… until after a couple of minutes of fiddling I realised that something looked very, very wrong (and no, not just the hashed up low-depth graphics). Firstly, the plus pack and sonic plugins were missing from the system, this included the Royal XP skin that is supposed to be included with MCE.

Secondly, not being familiar with MCE for XP having never actually bothered to install the thing, it took me a few minutes to realise that this was so radically different from the Vista version that it looked more like the third party MyCinema Media Centre than screenshots that I have seen of the XP one.

Windows XP Media Centre Edition About Screen

… 5.1.2600 (XP) 5512 (SP3’s build number) it worked!

Oh, wait a minute, that says “Windows XP Media Center Edition 2004

So I checked the disc’s (that I had never used before). They said MCE 2005… but a quick google told me that 5.1.2700 was MCE 2005 and that no references to MCE 2004 had even heard of 5.1.2600.5512.

So I checked Disc 2 \cmpnents\mediactr\i386\mediactr.cab pulled out ehshell.ex_, inflated it and checked the version number: 5.1.2700.2180:
5.1 (XP) 2700 (MCE 2005) 2180 (XP SP2’s build number)

I had Media Center Edition 2005.

Conclusion

I started with MCE 2005 and wound up with MCE 2004. Confused?

It then dawned on me that the SP3 redistributable must not have any awareness of MCE 2005 at all. The reason why the installer from a Slipstreamed MCE 2005 disc is asking for ehiEPG.dll is because when you slipstream, it doesn’t get the files wrong, it just assumes that you are using Windows XP Media Center 2004 and integrates the updater script for the patched version of MCE 2004!

Once I had given it the MCE 2004 source files (provided in the SP3 redist) it was more than happy to install and deliver MCE 2004 for me in fully working order.

So as far as I am concerned, if you have a MCE 2004 installation set, you can create a MCE 2004 slipstreamed media (although I do not know if the slipstream script will populate the updates onto disc 2 for you or not – I am assuming that it will. If however you have MCE 2005, then quite frankly you cannot slipstream MCE 2005 SP3 as there is nothing to slipstream.

Presumably if you reintroduce the MCE 2005 MEDCTROC.IN_ file after slipstreaming the base OS, you will be able to load a SP3 base OS and a clean SP2 level MCE 2005 – but I have not tested this hypothesise.

Experiment: Using a SoundBlaster Live! Drive II with an Audigy 2 ZS

System Requirements:

  • Windows 2000, XP, Vista
  • SoundBlaster Audigy 2 ZS
  • Live Drive II (Live!Drive 2)

The Problem:

I happened to have an Audigy 2 ZS with the Audigy Platinum Live Drive header, and a Live!Drive 2 from a SoundBlaster Live! Platinum.

The Question: could it work against the Audigy 2?

More Info:

Nope. Although the cable and connectors pin out (be it in reverse, requiring a 180 degree rotation of the Live Drive 2 bus cable) and the system starts, sound functions from the Audigy PCI card work correctly. The outputs on the Live Drive II emit a meaningless buzzing, and no interfaces on the Live Drive are able to function or are acknowledged by the Creative driver.

I tried, we failed.

Using a Creative Labs Sound Blaster Live! Platinum (CT4760) under Windows Vista

System Requirements:

  • Sound Blaster Live! Platinum
  • Windows Vista

The Problem:

This is Windows Vista we’re talking about… you had to ask?

More Information:

Put simply there are no native drivers for the original versions of the SB Live series with the Live! Drive 1.0 or 2.0. Microsoft stopped generating them with Windows Server 2003’s release, and in all but name so did Creative.

I can help you get sound, I cannot help you to get Surround Sound, the Game Port or to make use of your Live! Drive as the people at Creative once intended.

  1. Go to http://www.creative.com/ and then to Support
  2. Open the main downloads page
  3. In the Search by File Name or Model Number search for CT4760
  4. Download the 23.32 MB, 10 Mar 03 “Sound Blaster Live! – LiveDrvUni-Pack English”
  5. Double click the installer program, work through until it tells you it cannot find any qualifying products
  6. Hit Vista’s Device Manager
  7. Find the uninstalled Multimedia Audio Device, right click it and select Update Driver
  8. Specify your own file path for a driver
  9. Type or browse to the following, substituting %username% for the SAM name of your user account:
    C:\Users\%username%\AppData\Local\Temp\CRF000\Audio\Drivers\WIN2K_XP\
  10. Vista will install the driver and you will now have sound & sound control through the audio mixer

What does not work

Yes, they did release XP drivers for it in 2001, 2002 and 2003, and the 2003 release is what we are using – but if you actually need to use the Live Drive or want any SPDIF/Optical output e.g. have a 5.1 surround sound system, forget it. The best you will ever do with these driver is Stereo.

  • Many of the Live Drive’s ports (Exactly the same as using these drivers with XP)
  • SPDIF/Optical decoding to AC3 (Stereo is fine [Exactly the same as using these drivers with XP])
  • Create Joystick/MIDI port on the back plate of the card (Vista will not accept the driver)
  • Speaker profiling other than Mono/Stereo (Exactly the same as using these drivers with XP)

So much for the 1999 promise of lifetime support through the “LiveWare” program. That lasted all of 2 years.