We're very pleased that you want to get in touch with us. Please fill in the form below:

or   Close this form  
Some content

Peter Pilgrim :: Java Champion :: Digital Developer Architect

I design Java EE and Scala software solutions for the blue-chip clients and private sector

Hey all! Thanks for visiting. I provide fringe benefits to interested readers: checkout consultancy, training or mentorship Please make enquiries by email or call +44 (0)7397 067 658.

Due to the Off-Payroll Working plan for the UK government, I am enforcing stricter measures on contracts. All potential public sector GOV.UK contracts engagements must be approved by QDOS and/or SJD Accounting. Please enquire for further information.

VirtualBox CentOS Second Network Dynamic Host

07 August 2017 Comments off

2 minutes


I had recently trouble connecting to the Internet with Centos running inside the Oracle VM VirtualBox. Even though I had configure the second adapter Network Internet Connection to be Host-only Adapter with the name VirtualBox Host-Only Ethernet Adapter. I still had problems pulling any Docker images from scratch. It turned out the network was busted.

$ nslookup bbc.co.uk
Not found
$ ping
Network Unreachable

For the following section, it helps to become the “root” superuser on your Centos VM.
In order to track down the issue, check the current network status.

Outside of Docker container, inside the Centos VM, issue the following command.

$ ifconfig

You should see “enp0s3” and “enp0s8”, these are the Ethernet connections. “enp0s3” is the first NIC and the second is “enp0s8”, if you don’t see this, then it is down. Actually, you should also see “inet” address that means it is connected to your local LAN.

You need to configure the setup for Centos, so that when your VM starts, if starts this Ethernet connection.

Edit the following file /etc/sysconfig/network
Make sure you add the following


Ensure that you have valid DNS name server look up in your /etc/resolv.conf. Here, I used Google’s services and you could substitute your own ISPs:


Finally, edit the file /etc/sysconfig/network-scripts/ifcfg-enp0s3 and ensure the connection is up and running.


Make sure the ONBOOT=yes is defined. While you are at this point, check on script ifcfg-enp0s8 too.

Restart the system services:

$ service networking restart

Afterwards, see if the nslookup and ping previous now work for you.

Finally, issue a reboot on VM and try again

$ shutdown -r now

June 2017

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Contents of this blog entry are under copyright © 2017 by Peter Pilgrim and associates. For enquiries after republishing, please contact us for permission. All requests for syndicated content will be ignored /dev/null, consider yourself warned!

I help to design, create and build JVM components and services that are behind popular e-commerce websites.

My Blurb

Please get in touch , directly, to establish hire availability, contract & consulting opportunities.

Speaking at Your Conference

Contact by invitation

What Peter Does