Remote Gaming! (and Video Encoding using Proxmox and GPU Passthrough)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you've got an extra GPU laying around and you want to encode some video remotely maybe this is with Adobe Media encoder or Plex or maybe you just want a game remotely either way today we're going to show you how you can pass a GPU through to a Windows virtual machine and take advantage of that video card remotely Hey welcome back so I'm techno Tim and today we're gonna talk about passing a GPU through to a virtual machine now there might be many reasons why you want to pass a GPU through to a virtual machine so maybe you want to offload your Adobe Media encoder to another machine so that it's not taking up the resources of your primary workstation or maybe you want to encode your plex media streams with a dedicated GPU or maybe you just want a game remotely or set up steam and steam link whatever the case may be today we're gonna send up a Windows virtual machine and pass a GPU through so that you can take advantage of it on the virtual machine so there are a couple things you need before we get started raising proxmox so you need a proxmox server setup if you need help setting that up I've got a guide on how to install and configure proxmox as well as how to virtualize a Windows 10 machine after you've got that all set up there are still some requirements that you need for your proxmox server you need to make sure you have a CPU that supports virtualization on Intel that's the VT - X that you'll need to have and on AMD it's the AMD - B so you want to check your CPU before you try this guy next you're gonna need a GPU in this guide I'm using an Nvidia 1050 but anyone will do I chose an Nvidia 1050 because it draws all of its power from the PCI Express slot but again any GPU will do and I'll have some links in the description below GPUs that work and next you'll need some HDMI dummy plugs this is so the GPU thinks that there's a monitor plugged in but we'll get into that later so once you have all your hardware you'll want to shut down your server then you'll want to open it up if you need to connect your power adapter connect your power adapter then you close your server back up and you'll want to insert this HDI dummy port then you'll want to start your server back up and let's SSH into it so this might go without saying in order to pass the GPU through the GPU won't be available to the host anymore the guest will have direct access to this GPU and the GPU can't be shared across guests so that's just something to keep in mind is that this GPU will be dedicated to this virtual machine in only that virtual machine but before we do that we'll have to make some changes on our proxmox server we're gonna have to update grub and pass in some additional flags so let's SSH into our proxy box server okay so it's SSH root at your IP address of your proxmox server give it a password and now we're in and then we'll need to edit the grub file it's Nano btc-e deboned grub then we'll need to edit this line right here the grub CMD Linux default it might just say quiet we'll need to add some additional flags here so you can copy and paste this line from the description I've added some additional flags that I found that work because sometimes devices get grouped into pairs this helps break them up all of this line as well as another line that I found that works in the description below so after that we're gonna save it close out and then we're gonna run update grub and then after this will reboot our machine so once the server reboots we'll need to add a few more things so SSH back in and then we're gonna edit the modules file then you'll just want to make sure that these four lines are here so save close out you may need to reboot again after saving this okay so now let's get a virtual machine configured so if you followed my previous guide you want to make sure that remote desktop is turned on this is very important because once we pass the GPU through and configure this virtual machine you won't be able to use VNC to get into it so when I see V and C I mean you won't be able to use this console button to get into your machine so be sure that you turn on remote desktop for this machine and try remote desktop being in first before turning the rest on so if you follow my guide on how to virtualize a Windows 10 machine in proxmox we'll need to make a few changes here's what we'll need to change so we'll need to change the bios need to change it to ovm F UEFI let's say okay then we'll need to change the machine type to Q 35 and say ok next we'll need to add the efi disk so add efi disk choose where we want to store this say ok then i've needed to add some additional flag store cpu so that the guest machine doesn't know that it's being virtualized so we'll ssh back into our server then we'll want to edit that machines config file once we get here we'll want to change the CPU we'll want to set it to the host CPU and won't want to hide it from the virtual machine so now with the machine shut off we should be able to add our GPU so go to the machine click Add device and we're gonna add a PCI device choose our GPU here it's this one right here so you can see that Nvidia has two here you can ignore the second one I found that this is actually the audio device and we don't want to add the audio device this has caused problems for me in the past and so all we need to do is add the first one which is the geforce gtx 1050 we'll want to check all of these boxes all functions Rhomb our primary GPU and PCI Express so there's one thing we need to do before we start up this machine it's actually to block these drivers from being loaded from the hosts so in order to do that we'll actually modify this bottle right here and we'll want to block these four drivers from being loaded after that we'll save and exit now all that's left is just start the machine so let's start it up let's go back to console so remember when I said you won't be able to B and C anymore so you won't be able to access the machine through this UI anymore that's why it's really important to turn on remote desktop before any of this so the machine started up let's remote desktop into it so once you start the machine and going the device manager you might see this device already loaded windows will try loading some drivers but let's load the official drivers from Nvidia so we need to download the GeForce experience and install it so once you go through and install I recommend rebooting but you don't have to but now you should see your GPU pass through to your virtual machine one way to check to see that your video card is actually being loaded in that 3d acceleration is actually working is to open the video control panel once you open that up if you go to adjust image settings with preview you should see the 3d accelerated image rotating so now this is really awesome so we have a video card that's attached to our server and then it's passed through to a virtual machine so this means we can now take advantage of this video card within the virtual machine so we can do anything that requires 3d acceleration now one thing is placement games so I had loaded steam on here and I installed a few games and so let's check it out so one of my favorite games has dead cells and it looks like it's running so far obviously I don't have a controller attached right now I could attach a controller and probably pass that through to or pass it over RDP but for now I'll play with the keyboard but so you can see that this game is running keep in mind that there might be a little bit of lag and I highly recommend using a wired Ethernet connection to your server so if you're gonna play from your laptop you might not want to use wireless you might want to plug this into a switch you can see I can this is definitely playable it's 3d rendering right now no one likes the boot awesome well that runs to check out another game so torchlight is another game that I really like loaded just fine and just to prove that this is over remote desktop I'll actually pin this here so you can tell then I'm not faking it you can see it dropped some frames but I think that a lot of the frame jobs that are going on here aren't because the video cards dropping frames it's because remote desktop is trying to send all of this video over the network what if I turn some of the effects down if they'll run a little bit better I mean that looks pretty good for remotely playing on remote desktop level of nice okay I should probably stop playing and 10 yuan with this tutorial oh wait one more guy okay now I'll stop okay now I'm really gonna stop so you can see how powerful this is to be able to install a GPU on a virtual machine and then remotely connect to it and take advantage of that GPU as if you were sitting right in front of it now I know gaming is probably the most extreme case of taking advantage of this GPU but like I mentioned before you could use this for Adobe Media encoder or Plex transcoding so I have a pretty unique use case for to the whole reason why I did this was because I needed to encode to 24 by 7 live streams for both twitch and mixer with OBS and since both of these streams were running on the same server both virtualized I couldn't really take advantage of the CPU encoding each individual stream with the CPU just wasn't gonna work I was CPU bound and so each stream was lagging so my solve for that was go out and buy two video cards install them into my server create two virtual machines and then pass each of those video cars through to each guest machine and encode the stream in that way and here it is I'm able to access the Nvidia and make new encoder within a virtual machine because that GPU is passed through down to this virtual guest so that's what started me down this rabbit hole of trying to pass GPUs through to my virtual machines is because I wanted encode to live streams simultaneously and not spin up to PCs but I'm going way too far I mean your use case may be different whatever the case may be there are so many use cases for this and I'm sure you'll find unique and interesting ways to pass through your GPU to use them on a virtual machine so I hope you enjoyed this video and if you did leave a comment below I read every single one and I loved reading them and it lets me know if I'm doing ok if you have problems with passing your GPU through leave them in the comments section I scream every Tuesday Thursday and Saturday and you have a question about this video or GPU passes or anything else you can hop in my stream and I'd be glad to check it out so thanks so much for watching and until next time stream all my friends [Music] [Music]
Info
Channel: Techno Tim
Views: 183,723
Rating: undefined out of 5
Keywords: techno tim, pass gpu to vm, gpu pass through, proxmox gpu passthrough, gpu passthrough, remote gaming server, plex transcoding gpu, proxmox guide, nvidia virtual gpu, remote desktop nvidia, rdp nvidia, geforce passthrough, nvidia, amd, remote desktop, vm, virtual machine, virtualization, steam link server, homelab, vfio, pci passthrough, virtio, iommu, ovmf, obs remote, obs, gaming server, vt-d, vt-x, amd-v, remote gaming, pve, gfxmode, proxmox video card passthrough, sr-iov, sr iov
Id: fgx3NMk6F54
Channel Id: undefined
Length: 13min 27sec (807 seconds)
Published: Thu Mar 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.