Common VirtualBox Issues
Consider following Pete's guides until they can be properly migrated here: http://www.cs.middlebury.edu/~pjohnson/guides/linux/
Running VirtualBox with a HiDPI screen
A common issue on newer Macbook pros is that VirtualBox scales very poorly to the host display when it is a HiDPI resolution. Why this is, I do not know exactly. This results in very laggy window movement, typing, and overall updating of the screen to any changes. A quick and easy workaround is to plug your computer into a secondary non-HiDPI monitor and move the virtual machine guest window to that screen. You should notice immediate improvement in usability.
The second solution is to simply rescale the host resolution to a lower one, so VirtualBox can function.
- First install the RDM tool here: https://github.com/avibrazil/RDM. MAKE SURE TO INSTALL THIS IN YOUR HOST MACHINE, NOT INSIDE VBOX. Simply navigate to that link, scroll to the bottom, find where it says "installable binary package?" and follow that link. Once at that directory, click either the DMG or the PKG file for the latest version, and install normally. (If you use the DMG, you will have to open finder, look on the left for RDM, and click the PKG file in there).
- After installing properly, you should see a little screen icon in the top right of your screen on your toolbar. Click it, and select a resolution WITHOUT a lightning bolt next to it. Preferably a lower resolution, as there is a tradeoff between pixels and performance occurring. I find that 1440x900 is fine for visibility and performance, and going above 2560x1440 or more strains Vbox. View the image below:
After this is done, open up a new instance of VirtualBox and you should find the performance improved. Additional tips for improving performance on OSX:
- Make sure 2d/3d acceleration is turned off (Settings > Display)
- Turn the Graphics Controller to VBoxVGA (Settings > Display)
If you still have trouble after this, feel free to visit me in my office or shoot me an email at firstname.lastname@example.org.
OSX Kernel Driver Not Installed error
It is common on OSX to see an error like this:
Kernel driver not installed (rc=-1908)
Make sure the kernel module has been loaded successfully.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908)
- The support driver is not installed. On linux, open returned ENOENT.
- If you catch this error within the first 30 minutes
- Navigate to System Preferences -> Security & Privacy -> General
- You should see an error displaying "Software from Oracle was blocked" or something to that affect
- Click "Allow" to the right of the message, and VirtualBox should begin to work.
- See below image for reference (courtesy of apple):
- If the "allow" message is not appearing
- This occurs if you have waited more than 30 minutes since the first attempted load of the VirtualBox Kernel Extension.
- In order to fix this we have to do a few more complicated things.
- First, try uninstalling VirtualBox fully, deleting all relevant files, rebooting, and waiting 30 minutes. Re-install VirtualBox and see if the "allow" message appears when the error occurs.
- If that does not work, keep VirtualBox installed, but restart your Mac in recovery mode. (Restart your computer and hold cmd-R until the recovery mode appears)
- Once in Recovery mode, open a terminal prompt.
- Enter the command
spctl kext-consent add VB5E2TV963and press enter.
- Exit Recovery Mode and boot your computer normally, run VirtualBox and no error should occur.
- If further errors persist, contact your instructor or an ASI for assistance.
- Relevant Reading and Sources
If you encounter something like this:
(EE) Fatal Server error: (EE) AddScreen/ScreenInit failed for driver 0 (EE) (EE)
xinit: giving up
xinit: Unable to connect to X server: Connection refused
xinit: server error
or if it is preceded by:
(EE) Server terminated with error(1)
- Perform the following steps as a quick fix
- run the command
sudo systemctl restart dbus
- and you should see
This may need to be performed at every boot while the bug persists.
It is recommended you run
sudo pacman -Syu routinely to update your packages and help prevent this error.
No long term solution currently found.
Screen Flickering on OSX screens (or other)
If the above section on HiDpi screens doesn't fix your issues, try the following:
- Open VirtualBox, select your flickering VM
- Click Settings
- Go to Displays
- Under 'Graphics Controller' select 'VMSVGA'
- Click OK
Hopefully your flickering is solved!