As we know, VirtualBox provides several adapters that we can add and be used by OS guest. At the time of writing this post, I have an OS X (host) and Ubuntu Server 16.04.1 LTS (guest). The needs are, I want to be able to remote my Ubuntu from OS X terminal. I also want my Ubuntu guest can connect to internet. I have configured two network adapters for the guest (NAT and host-only).
When I run
The first/default adapter (NAT)
enp0s3 is recognized without any problems by the guest. But not the second one (host-only). To make the second adapter visible, I have to run a command
Now I got both adapters
enp0s3 (NAT) and
enp0s8 (host-only) visible on terminal. And now I can ping and run ssh from host (OS X) to guest (Ubuntu server).
In order to make it permanent, we need to edit
/etc/network/interfaces with the following lines
1 2 3
Then restart the network service by running
That’s my note for now and thanks for reading.