Thursday, January 26, 2017

Install Genymotion on ubuntu 16.04

I wanted to install Genymotion to my ubuntu 16.04 to run Nativescript  sample apps on Android simulator. As mentioned in the documentation first I installed the Oracle Virtualbox 5.1.0  then Genymotion.

But when I start the Genymotion it failed with following error.



This error message doesn't provide many details about the issue.  But when I open the genymotion.log (vi  ~/.Genymobile/genymotion.log ), that has the root cause for this issue.


VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp"
Jan 25 22:32:40 [Genymotion] [critical] [VBox] [createHostOnlyInterface] Failed to create interface


So, When you start Genymotion very first time, it is trying to create a "Host-only Network" in Virtualbox. That process going to fail if your system has enabled the "Secure Boot".



So as a solution:

1. Restart the machine and logged into the BIOS settings (Press F1 while rebooting the machine).
2. Under the "Security" tab  "Disabled" the "Secure Boot".

After that, you will be able to start the Genymotion on Ubuntu.