Terminal server gaming

debiruman665

Enthusiast
I'm pulling upon all the shared knowledge of all the people on the board. I only have a concept but I don't have the fully rounded knowledge to actually implement such an idea. We've finally saved up enough for a mortage deposit and moving into a new home within the next few months and I really want to try and realise a long standing dream of mine.

This is sort of a semi serious thought experiment but I'd like to see how this could be achieved.

It's sort of been a dream of mine to combine the cost of two gaming PC's into a single machine and install windows server using virtual shared pass through GPU's or virtual dedicated GPU.
 

Tony1044

Prolific Poster
Only certain cards support virtualized GPU pass through and remoteapp is deprecated.

What hypervisor do you plan to use?
 

debiruman665

Enthusiast
Only certain cards support virtualized GPU pass through and remoteapp is deprecated.

What hypervisor do you plan to use?
Despite working in IT for several years I'm a developer and haven't done much in the way of sysadmin.

I'm literally just poking in the dark and hoping some of the members might be able to point me in the right direction. I at least know the technology exists because of the existence of Google stadia etc.

I'd rather pay more and have better support than running a hooky open source setup that will have been on stack exchange every week debugging.
 

SpyderTracks

We love you Ukraine
I'm pulling upon all the shared knowledge of all the people on the board. I only have a concept but I don't have the fully rounded knowledge to actually implement such an idea. We've finally saved up enough for a mortage deposit and moving into a new home within the next few months and I really want to try and realise a long standing dream of mine.

This is sort of a semi serious thought experiment but I'd like to see how this could be achieved.

It's sort of been a dream of mine to combine the cost of two gaming PC's into a single machine and install windows server using virtual shared pass through GPU's or virtual dedicated GPU.
This is worth looking at, it's not HyperV, and 5 years old now, but still a way of doing what you're describing:

 

Tony1044

Prolific Poster
Ok so it's been a while since I did this but I looked at something similar last year.

First off I'll base it on Hyper-V as it's free and despite some of the comments you may see online, it is a bare-metal, type-1 hypervisor, even when installed into Windows that has a desktop environment (GUI) - some people seem to think it's a type-2 hypervisor.

Which gives us both advantages (performance, mainly) and disadvantages (a lot of hardware - e.g. some web cams won't pass through to the guests).

RemoteFX is still there in Server 2019 but it has no GUI anymore.

You have to install it via PowerShell and it was always recommended that you install the GPU drivers into the guest VM.

You could only pass one physical GPU through to one guest.

Check your Host GPU (You need RemoteFX Compatible GPU Card and Remote Desktop Virtualization Host role - these only ever used to be Quadro cards but YMMV)

Get-VMRemoteFXPhysicalVideoAdapter

You need to see the following:

CompatibleForVirtualization: True
Enabled: True

Enable Host GPU for RemoteFX vGPU:
Enable-VMRemoteFXPhysicalVideoAdapter

Add RemoteFX vGPU to your Guest VM:
Add-VMRemoteFx3dVideoAdapter -VMName <vmname>

Open guest VM's Settings dialogue box, and from there you can configure RemoteFX vGPU.

Start the VM and install the drivers.

Funnily enough my mate sent me a Quadro card a couple of weeks ago that he is not longer using to have a go at this very thing with but I haven't had time to get around to trying it.

VMware is also capable of doing something similar, but I don't know if the free version supports it.

 

Tony1044

Prolific Poster
This is worth looking at, it's not HyperV, and 5 years old now, but still a way of doing what you're describing:


An interesting concept but limited by having to be physically close the the base unit? MS did a similar product about 10 years ago for education - one desktop, 8-10 connections but all had to be within keyboard, mouse and video cable reach of the base unit. It never caught on.
 

Tony1044

Prolific Poster
High level steps (this assumes you've already installed Hyper-V):

Install the card;
Install the NVidia driver (WDDM 1.2+)
Install the Desktop Virtualization Role under the wider Remote Desktop Services Role
At this point, RemoteFX should be available to add to one of your VM's

I am a tad stuck because once the driver is installed, it stops my remote iLO working as it's no longer able to redirect the video (I may have a fix) and at the moment RDP isn't letting me into the server - if I reboot it a couple of times I get told it's reverted unsuccessful changes so I need to plug in a screen and keyboard and mouse later - can't do it now as I am meant to be working and the server runs my PPPoE firewall appliance so every reboot means around 8 minutes of down time for it to come back up and reconnect.
 

Tony1044

Prolific Poster
Something wrong on my server - will not let me install the Desktop Virtualization role. Will do some digging
 

debiruman665

Enthusiast
Something wrong on my server - will not let me install the Desktop Virtualization role. Will do some digging

Are you literally trying to do this right now?

Bro you want some compensation for this?

If this procedure could be perfected I think it could make a great system for families who would normally need to shell out on multiple individual machines.
 

Tony1044

Prolific Poster
Are you literally trying to do this right now?

Bro you want some compensation for this?

If this procedure could be perfected I think it could make a great system for families who would normally need to shell out on multiple individual machines.

It's been on my list of things to do for a couple of years but never had a GPU. My best mates sent me one he had no need of about a month ago and it's something I've wanted to get around to trying so your post was just the inspiration I needed to get off my backside :)

I just need to work out why it's not letting me add the blooming desktop virtualisation role.

My first thought was it's because I already have the hyper-v role installed but of course that's not the case as you can do this with the free version of hyper-v

I've done this before for Citrix vdi but not since server 2012 R2
 
Last edited:

Tony1044

Prolific Poster
Ooooohhhh kay

This is so much more complex than it used to be.

Seems that RemoteFX is dead unless you upgrade from 2012R2 (or lower) and have it utilised already.

You can only pass through the GPU to a single guest.

If you are running it on a server (which seems pretty much a necessity) then you really need to ensure the SV-IO is enabled before you even install the host OS.

Not doing this and adding it after...yeah lots of issues like "new" NIC's appearing, breaking all the virtual switches and teams because the old ones have disappeared.

It also handily disables any PCIE nVME SSD's which, when you have Virtual machines on a storage space using them is...problematic.

Anyway, long store short, turn on SV-IO first. :)

Step by step:

In the host OS (this is, of course, all Hyper-V based as that's my hypervisor):

Install the GPU and install the drivers. Note - if your server is an HP and it has iLO - kiss goodbye to remote console at this point, as it uses the embedded GPU and there seems to be no way back while ever the dGPU is in. Post-POST, it drops to a black screen.

RDP still works and this is how I connected as the server is headless (apart from having to plug a screen and keyboard in to enable SV-IO)

Launch device manager and disable the GPU.

Launch an elevated PowerShell session.

Type the following:

$pnpdevs = Get-PnpDevice | Where-Object {$_.Present -eq $true} | Where-Object {$_.Class -eq "Display"}

Followed by

$pnpdevs

This will return something like the following:

1590671177439.png


The device should show and error if you disabled it in device manager. If not, run this:

Disable-PnpDevice -InstanceId $pnpdevs[2].InstanceId -Confirm:$false

(Note - the sequence is 0, 1, 2.... from the top as you read them down. So the 2 in my case would be 0 if it's the only adapter listed, 1 if it's the second and so on).
 

Attachments

  • 1590671672033.png
    1590671672033.png
    41.8 KB · Views: 626
  • 1590672003751.png
    1590672003751.png
    39.5 KB · Views: 355
Last edited:

Tony1044

Prolific Poster
Part 2:

We now need to dismount the GPU from the host. To do that we need its PCI location:

$locationpath = ($pnpdevs[2] | Get-PnpDeviceProperty DEVPKEY_Device_LocationPaths).data[0]

(Remembering again to change the 2 if needed)

To dismount it:

Dismount-VmHostAssignableDevice -locationpath $locationpath -force

Go back to device manager and the GPU should be absent under display drivers, but you should have a dismounted device in System Devices:

View attachment 16380

Now. Create your guest VM. It must be a Generation 2 device. Windows 8+ is supported and I'm assuming Windows 10 is the flavour.

The VM has to have static RAM. It also must be set to turn off if the host shuts down - I am not sure why but it doesn't support pause, suspend etc.

Assign the dGPU to the Guest:

Add-VMAssignableDevice -locationpath $locationpath -VMname <Guest Name>

If it works there is no feedback. Useful.

Now, in the guest VM, you should see a new GPU appear but it will be a Microsoft Basic Display Adapter. This is good.

View attachment 16381

This means it has been detected. From within the guest, download and install the NVidia drivers.

And that is it.

It works.
 

Tony1044

Prolific Poster
Much easier if you have a GRID Card and an nVidia GRID subscription.

Also several grand to buy each though. lol
 

Tony1044

Prolific Poster
I've seen a few posts from people saying that they did it.

But I'm not sure if a desktop would support SV-IO and for Hyper-V at least, that seems to be the key component as it detaches the device from the OS. Without it, you can't dismount the GPU from the host.
 

Tony1044

Prolific Poster
Wowser you did it!

As for the hardware, is this possible on a beefy PC or will I need to be on a rack?

Servers don't have to be rack servers, by the way. You can get quiet towers.

I have no idea on the range the PCS sell though. I've always tended to stick to older (one or two generations back) from eBay as you get far more bang for your buck.
 
Top