Proxmox GPU/PCIE passthrough

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
proxmox virtual machine graphics card proxmox virtual machine graphics card proxmox virtual machine graphics card pcie passthrough next on low res diy [Music] so i want to take a graphics card and pass it through to uh one of my virtual machines a windows virtual machine and i can use it for remote gaming or let's say i don't want to use this computer to do the transcoding or whatever for my videos i can offload that that stuff to the the virtual machine and still use my my desktop for whatever it is that i want to do so what are you going to need to do this well obviously the first thing you're going to need is a graphics card and if your proxmox machine is made up of an old desktop or if you if you're lucky and have like a r710 or even hell or even our 210s you can get 16 by pci slots which most graphics cards come in anymore and and plug it in well in the case of the r210 you'd have to you know cut a hole in the lid and then you got to run power to it and all sorts of stuff if you wanted to use something a little more powerful but i'm going to be doing it in my r610 and my problem is this right here i can only get an 8 by pci or it only has an eight by slot so there's you know a couple different options to take care of this you can either uh do like a lot of people do and take your card and oop shut the picture down and cut a notch out of it and then your 16 by will still fit in there you're only going to have eight lanes but you know you can use a standard card now this one this picture came from uh the artist server he sells all this type of stuff uh don't know the guy or anything but he always seems to have everything you need i'll leave a link to his uh ebay store in the description if you're interested uh but i don't want to do that i don't want to you know go through all that hassle or anything and i just so happen to have have uh this guy right here let's go back this guy right here it is an old gt 730 i think is what it is yeah 730 zotac card i say old but i bought it about uh two years ago basically to use to set up servers and then i could pull the card out and everything else but it's only a four by you you can try to find one of these and then you can just slap it in and use it of course this is uh it's not going to be the most powerful thing in the world but depending on what you're wanting to use it for this might be just fine which it will be just fine for me so video card is one thing you need and the other thing you'll need to buy is one of these guys right here yeah can't really see it it won't focus but all it is is an hdmi dummy plug that makes the video card and your computer think that a monitor is plugged in because sometimes uh it won't boot up if it doesn't think that there's a monitor plugged into it or anything like that so i'm gonna go ahead and plug this guy into my server back here and uh we'll get started on going through the steps needed to uh do the pcie pass-through okay with our system all booted up and everything we're going to uh go into the shell of our node in this case is the node is low-res test because i'm doing it on my r210 just to make sure everything goes smoothly before i really start messing with the r610 and trying to avoid messing that one up so we are going to we're going to adjust the grub startup which basically grub starts up before the actual system does and it tells the kernel what it needs to do and everything so we're going to edit that file and the way we're going to edit that is we're going to go down here to right here grub command line linux default quiet we're going to take that out and we're going to replace it with this big long string here and of course i'll leave all these uh all this information down in the description for you and we're replacing it with the quiet still there but it's going to make the iommu on it's going to turn it on so we can use the the pat the pcie pass-through all this other stuff here is extra stuff that i'm throwing in there that i basically just found on my website that you know like if i just did the intel im iommu on with this system it wouldn't work but these extra commands forced it into working so all right add that command control x and yes we want to save it as soon as we get done with that we want to update grub and once it gets finished updating we are going to go ahead and restart the system and put those changes into effect so it's done now so let's reboot all right now that it's rebooted we want to edit this file right here the etc modules and we're just going to scroll down to the bottom give it a space and we're going to add these lines right here and uh what they're doing is they're telling the kernel how to utilize the the virtual function io and and give us the ability to to do pass-throughs and stuff like that so we'll save it yes we want to save it and we're going to reboot again with the server back up and running we are going to run this command here which is basically the an echo command which is going to make this file right here etc mod prob dot d i o m u unsafe blah blah blah and it's going to add this line right here this whole option uh vfio etc etc etc basically it we're remapping the system a little bit and some cpu some systems are not good at accepting that so it'll throw an error or a warning saying that it's unsafe what you're trying to do this will basically tell it we don't care do it anyway you know that's what we want to do then we are going to run this command right here and he's going to make that file right there for us which is going to say this stuff right here which is the the old way of doing some of this stuff was through kvm and it's going to tell it to basically ignore kvm we're not using it anymore we're using the vfio so we hit enter and that is is that part right there so we create those files for us the next thing we want to do is create another file a blacklist file and we want to blacklist certain drivers which are happen to be all the drivers for video cards out there and what this file will do is it's not going to allow the host system to grab a hold of that video card and use it for whatever it wants to do it's gonna you know make it still use the the on board video system that's on the on the motherboard control x yes we want to save that and now the system is set up to pass something through to to a virtual machine but it doesn't know what it uh what we want to pass through to that virtual machine so we're going to set that up now we're going to run this command here and what it will do is it will tell us it'll show us all of the devices that can be passed through to virtual machine and we're looking for the graphics card and right here vga compatible controller nvidia corporation uh geoforce gt710 was a 710. i thought it was a 730 whatever 710 but the number we're worried about is this right here 100 and it's the pci card address so we want to remember that we'll scroll back down and we want to run that this next command and back here where it says the pci card address let's go ahead and put that 100.000 in there and actually let's run it without the o and that'll give us both of the uh things on that on that video card because it's got a video controller and it's got a sound card on it also and we're just going to do both of them or give our ourselves the option of having both of them now that we ran this that command this number right there is the uh that's the gpu vendor number and you need to write that down or copy and paste it or something like that what the heck's going on here man copy and paste it or something like that myself i'm just going to copy and paste it over to uh notepad or something like that and the reason we want to copy and paste those and save those is because we're going to create another file and we're gonna add one line to it and right here where it says gpi gpu number and audio number let's take those out and we're going to copy and paste those two numbers in control x to exit yes we want to save it and we have that file created and basically that's just telling a vfio that hey this is what we want to pass through take control of it yada yada yada next thing we want to do is we want to update it with this command right here uh hit enter and let it run through it's its whole cycle okay after it updates we're going to do one more reboot and once the system reboots we're finally going to be ready to uh create a virtual machine everything's set up in the post system and we're going to start using it in the virtual system uh once this thing gets back up and running all right let's go ahead and make our virtual machine so we're going to come up here to the right create vm give it a click name it whatever you want to name it i'm just going to call it windows i'm going to click next it's going to ask for the iso image i've already uploaded this we're going to use windows we're going to change the type over to microsoft windows we're going to click next it's going to ask for the graphics card leave it alone don't touch it just let it pick the the default one our bios though we're going to change that to ovm f uefi our storage is going to ask you for the storage for that we're going to make it our local storage over here and then our machine we're going to change it to q35 and we're going to click next i'm going to change this to sata instead of ide and i'm going to give it let's say 100 gig even though the system doesn't have a lot on it next i'm going to give it all the cpus all the cores that this system has next this system only has 4 gig of ram on it so we'll just use half of it for this machine and half of it for the for the os click next we'll leave the network card alone and let's create the machine once it's finished creating let's go ahead and start it up go ahead and click enter there to make sure it boots from the the virtual cd all right i'm going to go ahead and install windows now but i'm not going to subject you to that pane the you go ahead and do it on your own if you haven't done it before go ahead and check this video out over here and it'll run you through the steps of creating a virtual machine uh on a proxmox system the one thing to remember is make sure that you pick windows pro you don't want home you want windows pro windows installed let's go ahead and expand this guy out uh you remember when i told you to make sure to uh i hope you remember because it was just a couple seconds ago if you didn't remember that holy crap brother you got some problems anyway like i said install windows pro the reason we did that is we want to use a remote desktop so click on your little window the little gear right here and let's just go ahead and type in remote and remote desktop settings right there we'll click on that i've already enabled it let's just disable it and confirm so when you turn it on it's going to ask you to confirm it go ahead and confirm it it's one thing we want to do real quick something else we want to do is we want to find out what exactly are the ip address of this machine is so we're going to scroll down and we're going to click on view hardware and connection properties and we'll scoot on down and what we're looking for is this number right here see where it says ipv4 address this one right here that is what we want so write it down memorize it whatever you need to do with it you know write a sky letter whatever just remember that's what it is and before we jump back out of this i just want to show you i installed davinci resolve which is a video editing program it's the one that that i use if we double click on it and try to start it you'll see that it won't be able to start because it's looking for an opencl capable gpu which the the we set it up as the default so it's running off the motherboard that's not it it's not going to work so it's not going to run so let's go ahead and shut this guy down once it gets done shutting down we want to go ahead and click on hardware and we want to add and what do we want to add a pci device and the device we want to add we're going to scroll down until we find where is it at right there the geoforce gt710 the one right under it is the audio controller that's on the the video card not worried about that we're going to click on that and then we want to click on all functions primary gpu and pci express let's click add give it a few few seconds to complete the ad process let's click on console and let's start our machine backup what's going on here it's not starting huh what's the summary say well the summary says it's not that it is starting so oh that's right we just changed the video card from the one on the motherboard to the the video card we installed that we're uh passing through so once we do that your console right here it's not gonna work anymore for seeing what's going on in the virtual machine that's one of the reasons we wanted to go ahead and get the uh the ip address of the machine so on your desktop you can go down your little hourglass or if you have the search bar whichever type in remote it's to ask for a remote desktop connection this is where you're going to type that ip address in and you're going to click connect now we're going to have to go ahead and click more choices because the my desktop uh login is different than what we set up for the virtual machine so let's go ahead and type in lores and give it the password and click ok give it a couple of seconds it's going to give you this warning it's going to say you know the remote computer could not be authorized whatever it's just safety measures that windows and everything else sets up for you so let's just click yes and now we're logging into that virtual machine but we're using the remote desktop instead of the console that is uh associated with proxmox i'm just going to click that on pin to let that disappear up into the top okay so you can see we're logged on now and uh everything's working but it's not working at its its full extent because just like when you uh install windows on a a all metal box and you need to go out and get the drivers for your your motherboard and for your uh graphics card and for whatever else you have installed in that machine you need to do that here for this graphics card that we're passing through and it's an nvidia card so i'm just gonna go out and i'm gonna download the the geforce uh experience and let it install everything for me okay now that the drivers are finally installed let's go ahead and try that davinci resolve again all right there you go it's uh up and running now i would go ahead and throw a couple video clips in there and start it up and show you that it works hey it works trust me it works but the only reason i'm not going to do that is because of the lack of resources on this machine and i've gotten enough of the headache waiting for it to install the drivers and things like that so anyway it works it just depends on the the speed of it depends on how much resources you devote to that virtual machine so like i said it works all right graphics card pass through a virtual machine remote desktop setup you can use it for remote uh gaming or whatever anything you might have in mind for it uh if this was you know one of your great white buffaloes great white buffalo well now you know how to tame it and get everything under control so if you like this video if it helped you out go ahead and reach down and karate chop that like button and roundhouse kick that subscribe button and i just want to say say thanks for watching and we'll catch you next time
Info
Channel: Lo-Res DIY
Views: 8,421
Rating: undefined out of 5
Keywords: PowerEdge, proxmox server, proxmox, homelab, Proxmox container, Linux, Passthrough, GPU Pass through, video card passthrough, proxmox video card passthrough, proxmox pass, proxmox passthrough gpu, proxmox passthrough, proxmox passthrough disk
Id: 5ce-CcYjqe8
Channel Id: undefined
Length: 20min 59sec (1259 seconds)
Published: Sat Oct 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.