Warning: This is completely unsupported and probably unmaintained. Use at your own risk! If you don't understand and accept the risks of test mode, running modified drivers, or trusting hacky patches from people on the internet, then this probably isn't the repo for you!
Generic fix to NVIDIA Code 43 on Virtual Machines
1. Start NVIDIA Driver Setup, Exit Before Installing (Unpacks to C:/NVIDIA, you might have to dupe the folder before exit on recent drivers as they seem to insta-nuke it)
2. Install the appropriate WDK/DDK, See OS Support
3. If on Windows 7, See Windows 7 Workaround
4. Enable Test Mode (bcdedit /set testsigning on) and Reboot
5. Open powershell and run patcher.ps1 C:/NVIDIA/DisplayDriver/Version/Win10_64/International/Display.Driver
6. Install Driver Through Extracted Installer (In C:/NVIDIA/DisplayDriver/Version)
So, the story so far: You have a VM that uses a passed-through NVIDIA graphics card
However, the driver errored out with code 43, or outright blue-screened your VM
This is because NVIDIA "Introduced a Bug" making their driver "Fail" on "Unsupported configurations", such as having a geforce, by "accidentally" detecting the prescence of a hypervisor
<domain>
...
<features>
...
<kvm>
<hidden state='on'/>
</kvm>
...
<hyperv>
...
<vendor_id state='on' value='whatever'/>
</hyperv>
...
</features>
...
</domain>
For some reason, at least on the test system, signtool in the Windows 7 WDK Post-Dates The Timestamp (possible reverse timezone compensation???). To get around this, remove all instances of the SKSoftware Certificate using mmc (if you have ran the script before), pre-date your clock by 2 days, and execute gencert.ps1 using powershell.
Tested with a Asus Z170-WS, i7-6700k, and kernel 4.7
Also tested with: