Hi,
You will need to set up your virtual machine to have full access to the GPU so that the linux machine can use it.
I am not sure you can actually do that all the time, you will need to check the configuration of your virtual machine to set it up properly.