Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vGPU is nice but is it affordable also??? #94

Open
H34dl3ss opened this issue Mar 17, 2022 · 9 comments
Open

vGPU is nice but is it affordable also??? #94

H34dl3ss opened this issue Mar 17, 2022 · 9 comments

Comments

@H34dl3ss
Copy link

Hey guys, don't get me wrong, your doing a fantastic job but the licensing is a showstopper unless I'm reading things wrong.
https://www.nvidia.com/content/dam/en-zz/Solutions/design-visualization/solutions/resources/documents1/Virtual-GPU-Packaging-and-Licensing-Guide.pdf

From the feature set it seems one needs the vWS license which is f***ing expensive for home users, isn't it?

What's the solution to this?
I almost jumped on the vGPU train to consolidate some gaming rigs, but this is definitely holding me off, even if Ampere should be supported somewhen in the future - which still is a big ? btw.

I think this issue should be noted as important in the readme!
Those YouTubers that make use of this work celebrate Nvidia for this vGPU feature but without addressing the licensing cost this remains a 90 days firework.
I guess Nvidia is not willing to give away the GeForce Now technology for free or at least at an affordable price for homies.

I'm curious about your views on the matter.

@noideaman
Copy link

if you are looking to avoid vgpu licensing because you are aiming for a similar behavior as windows 10/11 gpu-p you have to spoof the hardware id's of the GPU. Note that sometimes doing this after the nvidia driver has been installed (even with a DDU removal) it will still ask for a license.
Try doing what i did in #74 with a fresh install of windows 10
you must use the P type card and a version of the nvidia quadro driver that closely matches the host gpu driver (not the included grid driver)

@H34dl3ss
Copy link
Author

Reads quite hacky what you're doing over there. 😅
GPU-P seems a little more mature with hyper-v especially on W11 but my intention was to finally turn my back on Windows and go with a Linux host for daily business and run up to 3 VMs for Windows only apps and gaming (preferably local heads or via LAN stream).
I thought of using an RTX3090 on a 5900x, which should have enough beef to run 3 fullHD (at least) gaming instances.
But after reading lots of posts and watching several vids it seems I'm ahead of time with my requirements.
The most promising, doable and somewhat stable approach seems to be the W11 host with GPU-P to W11 VMs.
I'm somewhat disappointed, not being able to kick Windows and run this configuration on a Linux host yet. ☹️

@noideaman
Copy link

noideaman commented Mar 18, 2022

that is what the libvirt xml hack does(not vgpu_unlock by it's self), allows the vgpu unlock to run on your nvidia gpu to spread across the vm's with out using a license.
image

nvidia-smi
Fri Mar 18 16:38:57 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.124      Driver Version: 450.124      CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    On   | 00000000:01:00.0 Off |                  N/A |
|  0%   44C    P8    10W / 151W |   2055MiB /  8191MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    958200    C+G   vgpu                             1014MiB |
|    0   N/A  N/A    958279    C+G   vgpu                             1014MiB |
+-----------------------------------------------------------------------------+

As you can see windows sees it as a p5000 nvidia driver is using the generic quadro install and is seeing the vgpu card but not asking for the license.

in your libvirt xml replace the first line with

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">

this allows for qemu command line arguments to be passed
and after the closing "</devices>" tag add and edit the parts that say quadro-equlivent-to-consumer-gpu vgpu-uuid

  <qemu:commandline>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-vendor-id=0x10de"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-device-id=quadro-equlivent-to-consumer-gpu"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-sub-vendor-id=0x10de"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-sub-device-id=quadro-equlivent-to-consumer-gpu"/>
    <qemu:arg value="-uuid"/>
    <qemu:arg value="vgpu-uuid"/>
  </qemu:commandline>

Then do a fresh install of windows and try diffrent versions of the quadro driver
you can find old versions of the quadro driver here on the nvidia patch github look for the quadro table

@H34dl3ss
Copy link
Author

Thanks for this valuable piece of information!
Now only the missing Ampere support is the blocking point. The Turing GPU's have 11 GB memory max. which is probably OK for 2 VMs only. The 24GB of the 3090 are the solution for 3 gaming VMs.

@spy178
Copy link

spy178 commented Jul 28, 2022

@noideaman sorry for my bad english. I can't find libvirt xml as I am new to Proxmox. how can i show my gtx 1070 as quadro p5000? can you help?

@svargh
Copy link

svargh commented Jul 29, 2022

that is what the libvirt xml hack does(not vgpu_unlock by it's self), allows the vgpu unlock to run on your nvidia gpu to spread across the vm's with out using a license. image

nvidia-smi
Fri Mar 18 16:38:57 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.124      Driver Version: 450.124      CUDA Version: N/A      |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    On   | 00000000:01:00.0 Off |                  N/A |
|  0%   44C    P8    10W / 151W |   2055MiB /  8191MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    958200    C+G   vgpu                             1014MiB |
|    0   N/A  N/A    958279    C+G   vgpu                             1014MiB |
+-----------------------------------------------------------------------------+

As you can see windows sees it as a p5000 nvidia driver is using the generic quadro install and is seeing the vgpu card but not asking for the license.

in your libvirt xml replace the first line with

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">

this allows for qemu command line arguments to be passed and after the closing "</devices>" tag add and edit the parts that say quadro-equlivent-to-consumer-gpu vgpu-uuid

  <qemu:commandline>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-vendor-id=0x10de"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-device-id=quadro-equlivent-to-consumer-gpu"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-sub-vendor-id=0x10de"/>
    <qemu:arg value="-set"/>
    <qemu:arg value="device.hostdev0.x-pci-sub-device-id=quadro-equlivent-to-consumer-gpu"/>
    <qemu:arg value="-uuid"/>
    <qemu:arg value="vgpu-uuid"/>
  </qemu:commandline>

Then do a fresh install of windows and try diffrent versions of the quadro driver you can find old versions of the quadro driver here on the nvidia patch github look for the quadro table

@noideaman:
Have you or anyone tried installing cuda and running e.g. tenserflow with gpu acceleration in windows, also the use of nvdec and nvenc?
What is nvidia-smi in Windows cmd reporting?

@noideaman
Copy link

@spy178 i dont use proxmox, i would not know where to look
@svargh i have not messed with tensorflow but here is the output of nvidia-smi it does suport nvenc and nvdec and cuda looks to be installed
nvidia-smi

@genericness
Copy link

Is this legally alright? I'm not particularly sure if this licensing is for commercial, personal or what.

@aaravrav
Copy link

aaravrav commented Nov 15, 2023

@genericness IANAL, but using something "not legally obtained" is not the issue, but actually legally obtaining it. If your project is just downloading something already obtained, i.e a webserver that hosts an ill-gotten grid driver, it won't be an issue, but again IANAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants