bumblee and a virtual machine

Does anyone know how to get a virtual machine to run entirely on the
extra graphics card using bumblebee and nvidia optimus?

When I start up virtualbox, if I start it with “optirun VirtualBox”,
then optirun --status shows that bumblebee is running in one application.

When I start the virtual machine, it still shows that bumblebee is
running in only one application.

Then if I close virtualbox but leave the virtual machine running, it
shows that bumblebee is no longer running. I would like to be able to
run my virtual machine so that it always uses the extra graphics card,
not for games, but to see if it makes a difference in performance.

I am running VirtualBox-4.3, the latest version downloaded from Oracle.

Box #1: 13.1 | KDE 4.12 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 13.1 | KDE 4.12 | AMD Athlon X3 | 64 | 4GB
Laptop #1: 13.1 | KDE 4.12 | Core i7-2620M | 64 | 8GB
Laptop #2: 13.2 | KDE 4.14 | Core i7-4710HQ | 64 | 16GB

I suppose it depends on what you mean by “close virtualbox but leave the virtual machine running” – Although I haven’t studied if VBox is any different than most other paravirtualization, typically Guests run fairly independently and the management app is typically only “user mode utilities.”

Although nowadays I’m not running on an nVidia card so can’t verify anything,
Based on the openSUSE SDB (follows), there are at least a couple ways for Bumblebee support to be installed. If installed as an enabled service, I would think it should be available to the Guest even if User Mode utilities might terminate.



You could get in touch with the creator of this script for VMWare virtualizing and NVidia cards and see what exactly needs to be done for VBox. For VMWare, another executable is called for opening the VM from GUI and that executable needs to be opened with optimus/primus.