Jump to content

Headless virtualisation with GPU passthrough

Hello everyone,

 

To get some context, here's the hardware and detailed on my plan for the next month trying to upgrade my current machine :

 

 

Be aware that I didn't try anything yet, and all this work is just preemptive research to see if my goal is achievable.

 

To summarise, I'm going to be upgrading my GPU from a 1070 to a 2070s.
Since I won't be needing the 1070 anymore (plan is to use the old stuff like cpu, ram and mb for an HTPC) 
I'd like to investigate the possibility of creating a headless VM with GPU passthrough to the 1070 so that my friend can play remotely on it while I'm still using the computer.

 

I've done some initial homework and here's the checklist that I'm keeping :

  •     Even if there's some hack associated with it, Parsec (the gaming remote software I'll be using for the VM) does support headless machine
  •     The platform I'll be upgrading to (AMD ryzen 3rd gen and the MSI x570 motherboard) support AMD-V for hardware virtualisation
  •     I'm going from 16 to 32Gb of ram to account for the VM overhead and having two systems at the same time
  •     My storage solution might need some revision, but I think I might get away with what I have considering the headless VM will be used to play a verry limited amount of game (<100GB of game + OS)
  •     My Current PSU of 600W might be enough, but I'll be upgrading to something else to avoid getting poor power efficiency, especially with the Bronze one I have atm.
  •     I do have access to 2 different key of windows 10
  •     I got access to a cheap laptop if I ever have to setup or use an hypervisor
  •     My desktop machine is wired to simplify the setup
  •     Nothing will be plugged into the 1070 in normal use, but I do have access to a old tv that I can use for debugging or setup purposes

 

I also have some requirement on what I want to achieve :

  •   I want both my main OS and the headless one to starts whenever the computer is switched on
  •   I want to be able to game on both system at the same time, so discrete audio and video output
  •   I want my system to support Wake-on-lan as it's part of my house automation (my pc case being out of reach to actually use the power button daily)

 

I got a few question on how to conceptually do it, I'm curious and got an IT background, so I'm fairly certain that the technicality will not be a problem here

  •     Is it more sensible to have 2 VM both running out of a bare-bone host like unraid ? or should I just try to host the headless machine through my main windows system (and is this solution even possible) What would be the overhead       difference between the two solution ?
  •    Would getting a separate network card help in anyway ? I know a few things around networking, but it isn't my strong suite I'm afraid.
  •    Is there any solution that would let me edit the amount of allocated CPU cores at run time without having to restart VMs ? 

             The idea being that the headless VM would be used just a couple of hours a day, and when it's not, getting the cores allocated to my main OS would be idea

             not a huge issue, but if it's not really practical, I'll go for a 3900x instead of the 3800x.


Because my needs or probably unusual, I'm not expecting anyone to have an already made tutorial or anything, 
Virtualisation looks really deep and wide as a subject, so if anyone has any idea on which technology might be better to use, that would actually be really helpful.
I'm currently looking at videos and skimming old forum posts, but I wouldn't want to ignore a quick and easy solution to my problem.

 

Feel free to correct me on any assumption that would be wrong, and again, any input, even small ones, pointing me in the right direction are appreciated.

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

That's a lot to read.

 

30 minutes ago, Alphashepard said:

Is it more sensible to have 2 VM both running out of a bare-bone host like unraid ? or should I just try to host the headless machine through my main windows system (and is this solution even possible) What would be the overhead       difference between the two solution ?

You would be better off using UnRAID or another Linux distro like PROXMOX or Debian+QEMU as oppose to using Windows as the hypervisor. You may run into the NVIDIA Error Code 43 error though as NVIDIA doesn't allow the passing of their desktop cards through to virtual machines.

 

33 minutes ago, Alphashepard said:

Would getting a separate network card help in anyway ? I know a few things around networking, but it isn't my strong suite I'm afraid.

Assuming the bottleneck is your ISP connection using one NIC then Bridging the VM's adapters to the physical NIC would be your best option. They don't need dedicated network cards.

 

35 minutes ago, Alphashepard said:

 Is there any solution that would let me edit the amount of allocated CPU cores at run time without having to restart VMs ? 

Cores are a shared resource. You could assign all your cores to both VMs if you wanted you'll just run into performance issues if one user happens to pin all of them at 100% but you can thin-provision the cores. Say 6C/12T to each VM even though you may only have 8C/16T total. This would work fine. RAM is not the same though. You will need enough for the host and the VMs.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, Windows7ge said:

You would be better off using UnRAID or another Linux distro like PROXMOX or Debian+QEMU as oppose to using Windows as the hypervisor. You may run into the NVIDIA Error Code 43 error though as NVIDIA doesn't allow the passing of their desktop cards through to virtual machines.

 

UnRAID Nvidia build works for headless with GPU passthrough to VM. Im running this on a Ryzen server with a GTX1070 passed to an Ubuntu VM then to Docker Plex. 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 14 x 20TB Seagate Exos X22 20TB | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

23 minutes ago, Jarsky said:

 

UnRAID Nvidia build works for headless with GPU passthrough to VM. Im running this on a Ryzen server with a GTX1070 passed to an Ubuntu VM then to Docker Plex. 

I haven't heard of any hacks being required to trick the NVIDIA driver in Windows on UnRAID so my assumption is the hypervisor obfuscates the fact it's a VM so it's not tripping the kill switch in the driver. Never-the-less it's worth mentioning in the event he comes across it (in the event he tries a hypervisor other than UnRAID's).

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know why i never stumbled across the LTT video "2 gaming rig, 1 tower" that does look like a really close working example from what I'm looking for.
I'll try to follow what's being done in the video, as I don't think I need to change a lot.


From my testing yesterday, the headless machine will just need the GPU, a small ssd and 2 cores.

Is there any concern/advantage when splitting physical cores to two VM (1 thread each) ? or is it a non issue ? 


I know that Unraid doesn't know about threads, but I'm not familiar with AMD latest architecture to know if I should bother making sure thread pairing is respected.

Thanks for the heads up on the Error 43, googling it oppens up a huge investigation nightmare, Hopefully it'll be easier with unraid.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×