jamesstringerparsec / Easy-GPU-PV

A Project dedicated to making GPU Partitioning on Windows easier!
4.24k stars 426 forks source link

Allow easy setup with multiple identical GPUs #230

Open Dri0m opened 1 year ago

Dri0m commented 1 year ago

Hey, seems like it's not exactly easy to set up more VMs when you have e.g. 2 RTX3080 in your PC, you just see 2x RTX3080 in the list of GPUs. Since these cards have unique identifiers somewhere, could you please add some piece of that into the GPU's name? It would really make it easier if you're going down the road of setting up the ultimate gaming rig for multiple people :)

From GH issues I can see that there seem to be workarounds for it but you need to do them every time you want to upgrade drivers etc, bleh.

Dri0m commented 1 year ago

Since I'll be setting up such setup soon, I'll try to figure this out and might open a PR, but if someone knows just what exactly to look for (PCI ID maybe?) and how to fight powershell, it might be a very trivial thing for you :)

Jason3DR commented 1 year ago

Any update on this? It would be helpful, also is there a way to shuffle what gpu resources goto each vm after creation?

Dri0m commented 1 year ago

@Jason3DR at least for the setup part, if you leave only one GPU in the system, set up VM(s) for it, then take it out and put in the other one (don't shuffle them around in the PCIe slots just to be sure, not sure if this affects the setup) and set up the other VM(s), then put both cards in, it will work. You can verify during the swapping that it works, if you launch the VM that's using the GPU not present in the PC, the VM will (as expected) fail to launch. I did this and successfully set up 4 VMs.

amdchip commented 1 year ago

I have two Tesla P4's. I updated the script to use array object 1 on the below line and it spun up the VM utilizing my second Tesla just fine. No need to pull your cards as suggested above. Edit is on line: 4320 or search for the string: $DevicePathName = $PartitionableGPUList.Name[0] Edit to: $DevicePathName = $PartitionableGPUList.Name[1] for your second GPU or $PartitionableGPUList.Name[2] for the third, ect... Could probably throw a variable in there and add a more convenient option in the head of the script :)

amdchip commented 1 year ago

I would suggest appending GPUID = "0" to the $params section. Then edit the device path line to: $DevicePathName = $PartitionableGPUList.Name[$params.GPUID] "0" would be the first GPU. Simply update GPUID to "1" or "2" depending on what GPU you want to target. Cheers!!!

tony-rsrv commented 1 year ago

I have two Tesla P4's. I updated the script to use array object 1 on the below line and it spun up the VM utilizing my second Tesla just fine. No need to pull your cards as suggested above. Edit is on line: 4320 or search for the string: $DevicePathName = $PartitionableGPUList.Name[0] Edit to: $DevicePathName = $PartitionableGPUList.Name[1] for your second GPU or $PartitionableGPUList.Name[2] for the third, ect... Could probably throw a variable in there and add a more convenient option in the head of the script :)

How did you manage to get a P4 to work? I thought they only worked as accelerator cards and not graphics cards?

amdchip commented 1 year ago

I have two Tesla P4's. I updated the script to use array object 1 on the below line and it spun up the VM utilizing my second Tesla just fine. No need to pull your cards as suggested above. Edit is on line: 4320 or search for the string: $DevicePathName = $PartitionableGPUList.Name[0] Edit to: $DevicePathName = $PartitionableGPUList.Name[1] for your second GPU or $PartitionableGPUList.Name[2] for the third, ect... Could probably throw a variable in there and add a more convenient option in the head of the script :)

How did you manage to get a P4 to work? I thought they only worked as accelerator cards and not graphics cards?

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

amdchip commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

On Thu, Jan 19, 2023 at 8:24 AM tony-rsrv @.***> wrote:

I have two Tesla P4's. I updated the script to use array object 1 on the below line and it spun up the VM utilizing my second Tesla just fine. No need to pull your cards as suggested above. Edit is on line: 4320 or search for the string: $DevicePathName = $PartitionableGPUList.Name[0] Edit to: $DevicePathName = $PartitionableGPUList.Name[1] for your second GPU or $PartitionableGPUList.Name[2] for the third, ect... Could probably throw a variable in there and add a more convenient option in the head of the script :)

How did you manage to get a P4 to work? I thought they only worked as accelerator cards and not graphics cards?

— Reply to this email directly, view it on GitHub https://github.com/jamesstringerparsec/Easy-GPU-PV/issues/230#issuecomment-1397148055, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJIGSURWORXBXBBDE3E2KTWTFMCVANCNFSM6AAAAAASUIWRDU . You are receiving this because you commented.Message ID: @.***>

tony-rsrv commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

amdchip commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

tony-rsrv commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

Interesting since the drivers you linked are the guest drivers now that I check. I wonder if Proxmox is a requirement or if it will work bare metal. I'll have to put some P4's in my test rig and see how it goes. Thank you for the response!

amdchip commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

Interesting since the drivers you linked are the guest drivers now that I check. I wonder if Proxmox is a requirement or if it will work bare metal. I'll have to put some P4's in my test rig and see how it goes. Thank you for the response!

No problem. If your test fails on bare metal and you need my Proxmox config let me know. Othewise I would be interested in knowing your bare metal results.

tony-rsrv commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

Interesting since the drivers you linked are the guest drivers now that I check. I wonder if Proxmox is a requirement or if it will work bare metal. I'll have to put some P4's in my test rig and see how it goes. Thank you for the response!

No problem. If your test fails on bare metal and you need my Proxmox config let me know. Othewise I would be interested in knowing your bare metal results.

How long have you had this running under this driver? I know NVIDIA has a 90 day evaluation period but I'm not sure how it applies if it was done this way, especially if you didn't get it from their portal.

amdchip commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

Interesting since the drivers you linked are the guest drivers now that I check. I wonder if Proxmox is a requirement or if it will work bare metal. I'll have to put some P4's in my test rig and see how it goes. Thank you for the response!

No problem. If your test fails on bare metal and you need my Proxmox config let me know. Othewise I would be interested in knowing your bare metal results.

How long have you had this running under this driver? I know NVIDIA has a 90 day evaluation period but I'm not sure how it applies if it was done this way, especially if you didn't get it from their portal.

I had a few GPU-P client VM's runing for a few days. I didn't care for the client's disk performance under the Windows host. I ended up just using the Tesla P4's strait passthrough from Proxmox as I could allocate block level storage access for better disk performance. I have three of Tesla's I was going to split into 6 cloud gaming VM's. I may revisit this setup if I can solve the horrible disk performance bottleneck I was getting from the Hyper-V host. I am still using the same grid drivers through and its working great.

tony-rsrv commented 1 year ago

After lots of digging I found that with the correct drivers they work great! I attempted to gain direct access to download the drivers through Nvidia but they snubbed me. So I did some searching and stumbled upon the Compute Engine drivers hosted in Google Cloud https://cloud.google.com/compute/docs/gpus/grid-drivers-table. The latest Windows driver version 15.0 works great.

And there's no licensing requirements? I assume this is because licensing is done on the guest driver but GPU-PV would just be copying the host license to the guest?

I'm not sure on the licensing requirements but I didn't do anything hacky to get it working. No license server or anything. Just install the windows grid driver on the host and the P4 seems to work fine for GPU-P. The Tesla P4 is detected properly as a partitionable GPU. I am using Proxmox on metal with the P4 passed through to a Windows 10 VM Hyper-V host and ran this script to bring up some additional GPU-P VM's. The P4 shows in the task manager perfectly well under the Windows host and client.

Interesting since the drivers you linked are the guest drivers now that I check. I wonder if Proxmox is a requirement or if it will work bare metal. I'll have to put some P4's in my test rig and see how it goes. Thank you for the response!

No problem. If your test fails on bare metal and you need my Proxmox config let me know. Othewise I would be interested in knowing your bare metal results.

How long have you had this running under this driver? I know NVIDIA has a 90 day evaluation period but I'm not sure how it applies if it was done this way, especially if you didn't get it from their portal.

I had a few GPU-P client VM's runing for a few days. I didn't care for the client's disk performance under the Windows host. I ended up just using the Tesla P4's strait passthrough from Proxmox as I could allocate block level storage access for better disk performance. I have three of Tesla's I was going to split into 6 cloud gaming VM's. I may revisit this setup if I can solve the horrible disk performance bottleneck I was getting from the Hyper-V host. I am still using the same grid drivers through and its working great.

You may want to look at this project then: https://gitlab.com/polloloco/vgpu-proxmox