Skip to main content

Senior Web Engineer. Open web / music. Remote DJ. Tall Dutch guy. #3million

micro.blog/sander

svandragt

mixcloud.com/cloudseer

 

Fixing Virtualbox host network adapter cannot be created error

If when trying to start a vm, for example using vagrant, you get the error message that the host network adapter cannot be created:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
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 94 of file VBoxManageHostonly.cpp

Make sure to first start the virtualbox GUI application. It does some extra checks, and sometimes highlights the permission problem:

In my case (OpenSuse 15.1 Leap), my user was not added to the vboxusers group. Via Yast > Users and Security .... and editing my user account it was a simple checkbox away. Remember to relog.

If that doesn't work, reloading the kernel extensions could help:

$ sudo dpkg-reconfigure virtualbox-dkms
$ sudo dpkg-reconfigure virtualbox
$ sudo modprobe vboxdrv
$ sudo modprobe vboxnetadp

 

So you want to become a neckbeard?

Having wasted too much time installing Ubuntu on a laptop recently, I thought it would be helpful for the future self to document the issues.

Issues

I'm seeing one or more of the following issues with Ubuntu 18.04 LTS:
  • Missing text on the login screen
  • second monitor switching off
  • Hangs
  • Won't boot  directly into the OS
Install Ubuntu 16.04 LTS which is not a piece of garbage.
Migrate SSH keys from Putty to OpenSSH https://askubuntu.com/questions/818929/login-ssh-with-ppk-file-on-ubuntu-terminal/818932
What are the correct permissions for the .ssh folder? Typically you want the .ssh directory permissions to be 700 (drwx------) and the public key (.pub file) to be 644 (-rw-r--r--). Your private key (id_rsa) should be 600 (-rw-------). Lastly, your home directory should not be writeable by the group or others (at most 755 (drwxr-xr-x)).
How do I connect to our team networkshare automatically on startup?
sudo su
apt install cifs-utils
echo "//path/to/windows-share /mnt/team cifs credentials=/etc/samba/credentials,uid=1000 0 0" >> /etc/stab
cat > /etc/samba/credentials <<EOC
username=UserName
password=PassWord
EOC
chown root.root /etc/samba/credentials && chmod 400 /etc/samba/credentials
Change the username and password appropriately verify your userid is 1000 with id -u UserName
I skipped  creating a passphase for my encrypted home directory, how do I do it now?  run "ecryptfs-unwrap-passphrase" in the terminal
How to stop the mouse sticking to the edges of the display https://askubuntu.com/questions/119281/what-is-the-function-of-the-sticky-edges-on-off-setting-in-di...
Can't install vagrant plugins Download vagrant from vagrantup.com
nfsd is not installed sudo apt-get install nfs-kernel-server
vagrant booting vms reports a timetout delete (rm) the IdentityFile mentioned in vagrant ssh-config

This document will get updated as I stumble and fix other issues.

App Alternatives

Clipboard manager https://hluk.github.io/CopyQ/
Remote connection manager https://snapcraft.io/pac-vs
Google Drive https://www.howtogeek.com/196635/an-official-google-drive-for-linux-is-here-sort-of-maybe-this-is-al...
Phrase Expansion https://leehblue.com/ubuntu-text-expander/ https://github.com/leehblue/texpander
Screen Recorder Kazam (https://askubuntu.com/a/29954), installs well with apt. Alternatively Simple Screen Recorder.