I am currently attempting to set up a Ubuntu 21.04 Virtual Machine on Virtual Box and am attempting to use the 3D acceleration and it is refusing to use the Nvidia GPU and instead uses the integrated graphics card instead.
Host Setup:
Windows 10 x64
Nvidia GTX 1660Ti
I have specified the graphics card to the High-Performance NVIDIA Processor in the Nvidia Control Panel for the following
C:\Program Files\oracle\VirtualBox\VirtualBox.exe
C:\Program Files\Oracle\VirtualBox\VBoxSVC.exe
C:\Program Files\oracle\VirtualBox\VirtualBoxVM.exe
I have also installed VirtualBox Guest Additions and have checked using nux that 3D acceleration is working
Not software rendered: yes
Not blacklisted: yes
GLX fbconfig: yes
GLX texture from pixmap: yes
GL npot or rect textures: yes
GL vertex program: yes
GL fragment program: yes
GL vertex buffer object: yes
GL framebuffer object: yes
GL version is 1.4+: yes
Unity 3D supported: yes
Therefore 3D acceleration is working but seems to only be using the intel one.