Can I run cuda on Virtual machine

Hello Everyone,

First of all, I hope this question is suitable for this forum. If not, I apologize.

I have got a laptop which consists of two GPUs; intel hd graphics630 and nvidia m1200. I wonder that can I use my nvidia gpu on my virtual machine to run CUDA?

It may be possible using PCI passthrough and trying to hide from the nVidia driver that the guest OS runs inside a VM (note that it is not officially supported by nVidia)

e.g. in ESXI

or in qemu / KVM by to fix error 43 during nVidia driver installation

with a required KVM config change

...
<features>
 ...
 <kvm> <hidden state='on'/> </kvm> 
 ...
</features>
 ...

All very hacky and not guaranteed to work.