Virtual Box on Ubuntu Desktop 1604

Oracle VirtualBox runs well on Ubuntu 1604 host, but you should know how to set it up to have a good user experience with it.

It this article I will show you 4 pitfalls, and how to avoid them.

1. Default installations fails referring to kernel module failed
2. Can not connect remotely with RDP
3. Windows guest display is flickering/unity menu overlaps guest full screen
4. Can not set second screen to full screen



1. Replace stock Ubuntu VirualBox with the latest from Oracle

When you install on Ubuntu 1604 desktop VirtualBox  from the Ubuntu Software application, you get an old version (5.0.40) which is not anymore supported by Oracle. Recently it is just hanging when starting a virtual machine or sending error: "virtualbox kernel module failed to build". Here is a bug report for it in VirualBox site.

Solution:

Install virtual box from oracle repositories. On this page: https://www.virtualbox.org/wiki/Linux_Downloads you can find the detailed steps to install the latest version.


2. Set up remote RDP to access vitrual machines remotely

You have to install the VirtualBox Extension pack from here: https://www.virtualbox.org/wiki/Downloads

But this is still not enough, as there are more remote access possibilities, you have to run the following command to properly set it up:

VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"

3. Windows 10 guest screen if flickering

You have installed a Windows 10 guest and the screen is flickering when enabling 3D acceleration. Or when you disable 3D acceleration, then if you are using multiple monitors, the Ubuntu unity menu is overlapping the full screen guest display.

Solution:

Enable 3D acceleration, the screen flickering is happening only if you have a Nvidia graphic card. Since 5.2.8, there is an environmental variable that you can set to disable flickering.

Add the following line in /etc/environment:

CR_RENDER_FORCE_PRESENT_MAIN_THREAD=0

Then restart your computer, this will fix the flickering.

4. Can not set the desired screen resolution

In my dual monitor system, if on the full screen Windows guest machine I press Win+P, I can extend my desktop to the second monitor, but I was not able to set it to the full 1600x1200 resolution, because it did not appear in the windows Screen settings.

Solution:

In VirtualBox main window go to the menu File/Preferences/Display, and in the Maximum Guest Screen Size box select "Hint". Then I entered the maximal screen width and maximal screen heights from the 2 monitors and since then I could set the preferred size.

Bonus hint: Cannot enable USB connection to guest 

When first tried to enable an USB device to guest, there was not USB devices in the menu, but actually I had iseb devices plugged in.

Solution:

In order this to work you should be part of the vboxusers group. To add yourseft type the following command:

sudo usermod -a -G vboxusers laco


Comments

Popular posts from this blog

Setting ethernet interface speed in /etc/network/interfaces