I am struggling to set up a static IP address in Ubuntu server 18.04 server LTS. The OS is running in a VirtualBox machine.
What I have done so far:
- Created a VM.
- Added a "NAT and a "Host-only" adapter to the network settings in VirtualBox.
- Installed Ubuntu Server 18.04 LTS.
- Configured netplan with static IP settings matching IP of "Host-only adapter.
- Ran
netplan apply - Ran
netplan --debug generateto check syntax accuracy. (Passed) - Rebooted server
My current netplan configuration as described by the netplan documentation:
Ping results in an error message: Temporary failure in name resolution.
Gateway and nameserver addresses are set to the IP of the NAT adapter in VirtualBox's "Host Network Manager" as per screenshot:
The "Host-only" adapter is added to the VM under adapter 2:
This is configured in netplan as enp0s8.
Changing the configuration back to DHCP using eth0s3 allows name resolution, but the moment I switch back to eth0s8 with a static configuration I am unable to resolve to any domains.
Update: See the result of "route -n"
Please assist.




