How can I get virtualbox to run with a hosts-only adapter?

I'm trying to setup a Hosts-only Adapter so I can connect to it. It says that invalid settings detected and the name: drop-down isn't populated. What am I doing wrong and how can I rectify it?

My Host is osx and my guest is ubuntu.

enter image description here


It seems like these adapters are added in Virtual Box -> preferences -> network.

enter image description here


Since Virtualbox 5.2.xxx, the location to create a host-only network has now changed to File -> Host Network Manager...

Clicking on the Create button in the Host Network Manager window will create a host-only network called vboxnet0, which you can then use within the VM settings.