Close

Streaming Steam games from a headless VM

A project log for The HYDRA multiheaded virtual computer

The HYDRA is a computing platform using a small footprint Hypervisor to run 1-6 (or more) hardware assisted virtual machines of any x86 OS

ericeric 05/19/2014 at 02:300 Comments

As you may have noticed, SteamOS is one of the VM's running on the feature pic of the Hydra. It's still in beta, but shows promise as an open source alternative game console. The next prototype I build will be a console sized dual gpu SteamOS + Win7 which closely matches the 3 OS architecture of the XBOX one.  

Steam kind of needs the Win7 VM, since SteamOS is linux and half or more of Valve's games are windows. The workaround is to STREAM the games from your windows pc, which requires it to be up, running, with a monitor attached.  So I setup the streaming between 2 VM's, and even had 2 win7 VMs streaming separately to 2 SteamOS VM's. This is cool, but it's really just a stunt in the long run, since it's all on the same computer

I subscribe to the Valve message boards regarding SteamOS & Streaming, just to ensure the game console Hydra meets end user needs.  The desire to stream FROM a headless VM has been expressed repetitively, with the solution being some $100 EDID device.

We certainly cannot let that be the solution, so here's how to stream Steam games from a headless VM :

First, you need to make the VM think is has a display attached.  The graphics cards I am using have HDMI, DVI, and VGA. Fooling it to see a VGA monitor requires 3x  75ohm resistors, from pins 1-6 2-7 3-8.  Just stick them in the holes of an extension cable.

Now that the VM thinks it has a VGA monitor connected, you need to get it to be the ONLY monitor connected.  I suppose you could hook one up for real until everything is set, and then switch to the resistor cable, but I used Radmin from famatech.com since I already had it on the VM.  Disable all displays except the VGA.  Set windows to auto-login and Steam to autostart. 

You can now stream headless, but there won't be sound. We need to edit the vmx file and add a virtual sound card, that for some reason cannot be added from vSphere. 

De-register your VM from the inventory, just right click on it in vSphere and select "remove from inventory"

SSH into your host, and navigate to /vmfs/volumes/datastore/(folder where the VM is) and edit the .vmx file with vi as such:

sound.present = “true”
sound.allowGuestConnectionControl = “false”
sound.virtualDev = “hdaudio”
sound.fileName = “-1″
sound.autodetect = “true”
sound.pciSlotNumber = “35″

Note the pciSlotNumber value, you will have to review your .vmx file and select a number not used for another device. I didn't see "35" anywhere, used it and it worked for me. 

Save the .vmx file and add your VM back to the inventory. (use the datastore browser and right click on the .vmx file you edited and select "add to inventory")

Edit settings in vSphere and you should see:

Now you can stream games from a headless VM, with sound, that requires NO interaction from you to initiate.

Discussions