Can I use password searching on GPU if I work on a virtual machine?

No, unfortunately, it's impossible.

When using virtual machines the system does not provide an opportunity to work with GPU through video card original drivers. I.e. the programs cannot connect to GPU and password searching becomes impossible.