The ultimate gaming virtual machine on proxmox

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
for the Moment of Truth we're going to click on start now change the input of my screen my HDMI and Moment of Truth in this video I'm going to show you how to create the ultimate gaming virtual machine on proxmox so let's get started okay so I prepared One proxmox 8 Note here I have a video up here so you can go and check out how to install proxmox in this case I already have it installed it's a fresh installation of proxmox 8 so let's connect via ssh in this case the IP of my proxmox environment is5 as you can see proxmox 8 is here installed first we're going to do all the changes in clii and then once we're ready to create our VM we're going to jump in the web interface the first thing that we need to do is we're going to check our GPU and we're going to see if the right drivers are being used to do that we're going to use the utility called lspci and then we're going to grab and we're going to search for NVIDIA so I'm just going to do a I to ignore the case and as you can see here I have uh Nvidia Corporation GV 100 this is a Titan V GPU on my proxmox node let's check what driver this GPU is using we're going to use the same utility lspci but now with a-v just like that we're going to scroll and look for our Nvidia Corporation Titan vs right here okay so as you can see the current driver is the novo driver this is not what we want we want to load the vfio drivers first we need to tell the colonel to load the vfio kernel modules to do that we're going to use the following command here we're basically just creating a new file under modules load D called vfio PCI with the contents of vfio PCI this will instruct the konel to load vfio at kernel load okay now we need to specify what PCI Express devices we want the vfio driver to attach to in this case it's our GPU and to do that we need to find out what is the GPU ID so to find the GPU ID we're going to use the following command it's going to be lspci like before but this time we're going to do a dhnn and we're going to pipe that to GP and search for NVIDIA again so as you can see the output is similar as before the only difference is that this time we can see the IDS of both our Nvidia devices so this is a GPU that has a video device and an audio device to be able to fully use the the GPU in our virtual machine we need to pass through the GPU and the audio device too so we're going to grab both IDs here now we're going to create the configuration file so with this command we're going to create another new file under Etsy prob dvf.com and we're going to put the options as options vfio PCI and then we're going to pass the IDS of the card which is the video for this one and the audio for this one here so we're going to execute that now there's an extra step that we need to do which is enabling iommu groups they are basically PCI Express groups where your devices are grouped in for for GPU pass through to work properly we need to enable this and we also need to make sure that our GPU and our audio device from our GPU are in the same immu group this is the part where like it might vary on your configuration and your type of motherboard in this case I'm using an Intel motherboard and with an Intel CPU and I've enabled multi-gpu support on the BIOS meaning that I'm able to use my integrated GPU and my dedicated GPU the Titan V now if you have an AMD CPU with an AMD board this step might vary but I'm going to leave also an alternative commands if you have an AMD CPU and motherboard combination let's configure it for Intel first we're going to open a file called / Etc default grub and this is basically the grub configuration file so here's where we're going to configure our Intel immu setting we're going to go down to Grub CMD line right here before quiet we're going to to add intelcore muu equals on space now we're going to exit yes we want to write the configuration so for this to work Intel vtd and immu needs to be enabled on your Bion this is just a bio settings I will show you where I found my settings I currently have a MSI board but in your motherboard might vary where you find this settings all you need to know is that these both settings for Intel CPUs need to be enabled so now that our configuration file is written now we need to update our grub configuration to do that we're going to use the command update grub okay so this is just updating our grub configuration so now we're going to reboot our machine and after we are going to verify that our GPU is actually using the vfio PCI driver so I just wanted to show really quickly what are my options on my MSI Motherboard all the virtualization options are actually under the overclock menu which is a little bit weird I just click on overclock and then I go all the way down to CP features and here as you can see I have inter virtualization technology enabled and Intel vtd Tech enabled also for the multi-gpu support like I said at the beginning of this video on my settings here if we go back to settings and then I go to advance and then I go into integrated Graphics configuration here I set this up as igd meaning that my primary GPU is my integrated Graphics GPU this is the GPU that proxmox is going to use to display the proxmox CLI leaving my GPU alone to be able to be passed through to the VM so if you don't have this feature on your AMD CPU or you don't have an integrated graphics on your AMD CPU I'm going to leave in the description below a command that might help you with the GPU pass through if you have any issues with the frame buffer or anything like that okay so our machine is back let's connect back with SSH so now we're going to verify whether our GPU is actually using the vfio kernel driver first let's see if the vfio driver is loaded into the kernel to do that we're going to use LS mod Linux command LS mod and then we're going to grip for vfio and as you can see the vfio PCI PCI cord U and vfio kernel modules are loaded into the kernel this is a good sign now let's check if our GPU is actually using this driver we're going to use the previous command lspci like before so we do lspci DV and we'll look for our Nvidia GPU and as you can see the Nvidia GPU is here Titan v as you can see the kernel driver that is in use is vfio PCI so we're good to go now we're going to confirm whether or not our GPU is in the correct immu group to verify theu groups I have a very handy script that will tell us if our GPU is in the same group this script I'm going to put it in the description below so make sure to copy and paste it from there so we're going to create a new file with Nano it's just going to be in the root directory and the script is called I M group. SH now I'm going to paste the script and we're going to save this file so write the buffer yes okay so now we need to make this script executable so we're going to run the CH mod plus X command to change the permissions and now we're going to run the script so as you can see we have group zero group one group two group three Etc in the current motherboard that I'm using the IU groups are actually okay there it doesn't need any more tweaking but if you're having trouble with this I'm going to leave some notes in the description of the video that might help you put your GPU in the right group you can see here that group two has my VGA controller the Nvidia Titan V and also the audio device from the Nvidia GPU both the PCI Express devices from the GPU are recognized in the same group this is a good sign now we can move forward okay so now we're ready to create our Windows VM and pass through this GPU okay so now our proxmox host is ready to go so we're going to jump here in the web Bui so that we can configure our VM so I'm just going to go to my IP of my proxmox host okay regular SSL Error we can skip that login with your proxmox user so this is our proxmox instance that we previously configured I already uploaded the Windows 10 ISO and the V IO Windows driver ISO I'm going to leave links down below where you can go and download these two ISO files we're going to need both isos so that we can install Windows 10 and we can also install the ver iio drivers the ver drivers are very important to take full advantage of the maximum performance that you can get from this VM let's create our VM so creating a Windows VM is fairly easy on proxo so I'm just going to speed through this and I'm just going to highlight the important parts okay so creating a Windows VM so name just Windows 10 that should be fine create on advanc now for the iso we're going to select Windows 10 ISO we're going to choose Microsoft Windows 10 click on additional drive for V iio drivers and choose use your windows uh your ver IO Windows driver here now click on next we're going to change the graphics card to ver IO GPU we're going to change the type of machine to Q35 UEFI we're going to select our local storage for the UEFI store I'm also just going to add a tpn this is not necessary but it's good to have now we click on next we're going to do the drive so we're going to change the block device this is the this is an important part here you need to choose ver iio block because ver IO is going to give you the best dis write and read performance we're going to select Vero block device storage local VM we're going to give it 128 gigs of storage that should be good enough the rest we can leave it as default and click on next here where I'm going to select eight cores for the CPU so this is also very important to take full advantage of all your CPU instructions and performance we're going to change this from the default to host all the rest you can leave on default is pretty good now we can click on next for memory I'm going to allocate 8 gigs of RAM that's that should be good click on next and now for the network we're going to do the same ver too is going to give you the best performance for your network all right so we're ready to go click on next all our settings are good to go and we can click on finish okay just wait a couple of seconds for our VM to be ready and it's ready so now we can click on our VM here we can click on console and we can click on start now okay press any key to start and boot from the CD this is going to load the windows installer okay so regular Windows installation we all know how to install Windows so I just click on install now I don't have a product key and then next we're going to choose Windows 10 professional yes I accept the license going to do a custom installation and here is the part where we're going to load the vfio driver as you can see by default the Windows installation is not able to detect our drive so now we're going to load the driver so click on load driver we're going to click on browse now we're going to go to our ver IO Windows CD here we're going to go to amd64 and then we're going to choose Windows 10 and we click on okay and as you can see it's automatically detected we click on next and this is going to load the driver into the Windows installation so that we can install Windows we're going to click on new to create the windows partitions click on okay we're good to go click on next and now we just sit tight and wait until Windows is installed and the Machine reboots by itself okay so now we're booted into Windows 10 and we're going to install the vfio driver so that all our devices are up and running we're going to right click on the start menu we're going to go to device manager and as you can see there are a couple of devices that we need to install so just right click and click update Drive click on browse and then click on browse again we're going to go to our Windows vfio CD here and then we're going to choose that as the source include subfolders and then click on next this is automatically going to search the entire ISO and install all of your drivers we're going to repeat the process and do that with all our devices here so update browse our vfio CD again click on next and that's it now we're going to do the same thing for our internet connection our ethernet connection update driver browse and then then click on next okay perfect the network is detected cuz we're connected to the bridge of proxmox so we should have an IP on the same VLAN or the same network as our home network okay so as you can see here we don't have our GPU yet so here we're going to actually pass through the GPU into our VM to do that we first need to shut down our VM so we're going to click on start and we're going to click on shut down now we're just going to wait for the VM to be fully off now as you can see the status is stopped so now we can click on our VM and then we can go to Hardware so this is the interesting part here is where we're going to add our PCI Express GPU so we're going to click on ADD we're going to click on PCI device we're going to click on Raw device and we're going to go ahead and look for our Nvidia GPU we're going to select just the GPU and we're going to select all functions all functions mean that it's going to pass through also the audio device and if your GPU has multiple devices is going to pass through all of those devices too so the PCI Express flag here is very important I I wasted a lot of time trying to make it work and it was just a matter of enabling this option enable it and then click on ADD so now that our PCI Express device is passed through AKA our GPU now we're going to go back to the console and start our VM okay so we're back on our Windows VM and now we can go again to the device manager and as you can see we have a Microsoft basic display adapter we have a second display in our device manager so now we need to download the Nvidia driver so we're just going to go ahead and quickly go to our edge browser yes we all love Microsoft we can continue we're going to go to quickly to Google we're going to search for NVIDIA drivers yeah download drivers just choose the GPU that you're using in this case mine is a Titan Series so I'm just going to go click on Titan Titan series Titan V and Windows 10 game ready driver that should be good enough click on download click on download Again download so now we're just going to install the Nvidia driver like we usually do on any regular PC and hit yes for that going going to click on okay in the past Nvidia actually blocked this functionality from working on GeForce cards but now with the newest drivers it doesn't matter what type of GeForce card you have it can be an RTX 3080 2080 1080 or anything like that as long as it's a relatively new GPU and you're installing the latest available drivers this should work for you if you have any issues just put it in the comment section below I'm pretty sure I will be able to help you get your GPU pass through working as you can see here the Nvidia tit NV is already detected as an Nvidia card this is because Windows probably installed the default driver on the background while we were downloading this driver but we're going to install the new driver regardless so just Nvidia graphics driver I agree and we're going to do a custom we're going to do perform a clean installation and we're going to do next I'm just going to fast forward when this driver is done we're going to test if this GPU pass through is working I'm going to connect my GPU to my screen and I'm going to show you whether or not we have a video feed from our GPU into the monitor okay so now for the Moment of Truth we're going to click on start now change the input of my screen my HDMI and Moment of Truth and there we go so we have our Windows feed from our GPU directly into my monitor confirming that the GPU pass through is working 100% okay so from here on out you have a couple of options to be able to you use your windows VM and take advantage of the GPU pass through you can either connect your screen directly to the GPU and connect a keyboard and mouse directly to your proxmox machine and then you can also pass through the USB I'll show you quickly how to do that it's very easy you just go to Hardware you go to add and then you go to USB device and then you go to USB port and then you just choose your keyboard for example I have a black widow ultimate here connected to my device I also click on USB device again pass through the port and I'm going to add my Logitech mouse to the the VM with this setup you have your machine plugged into your monitor and then you have your keyboard and mouse plugged also to the VM so you can take full advantage of the VM now the second option that you can choose for too is to use parek and park is a really good app so that you can game remotely if you're on your machine locally at home it's super fast and also if you're actually on the go if you travel or if you go to a friends house you can access your VM from anywhere in the world so installing Park is also a great option for this type setup and you're going to take full advantage of the GPU acceleration that the Nvidia Graphics offers all right so now for the fun part here are some benchmarks so as you can see on the left side you have the bare metal performance of this machine and on the right side you have the VM performance as you can see the scores are very close meaning that your VM is taking Almost 100% advantage of your bare metal CPU and GPU performance of course there's always going to be a little bit of an overhead because of prox MOX is running an entire virtualization environment in the same machine so the scores are fairly close and this will give you a extremely good performance on games both benchmarks were made on a 1080p Monitor and using the Titan v as the main GPU so that's all I got for today I hope you enjoy it and I'll see you on the next one
Info
Channel: Distro Domain
Views: 4,304
Rating: undefined out of 5
Keywords: gpu passthrough, remote gaming, proxmox gpu passthrough, proxmox gpu, proxmox vm gaming, gaming on a vm, gpu passthrough gaming, gaming on proxmox, pcie passthrough, pcie passthrough proxmox, proxmox 8 tutorial, proxmox 8, debian gpu passthrough, how to setup proxmox, how to install proxmox 8, virtual machine gaming, how to pass a gpu in proxmox, vfio configuration, vfio drivers, best settings for vm, high performance virtual machine, high performance vm, proxmox gaming
Id: iWwdf66JpxE
Channel Id: undefined
Length: 17min 18sec (1038 seconds)
Published: Fri Dec 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.