Host-only network adapter (enp0s8) not starting on boot in CentOS7

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I've installed CentOS7 in virtual box. I've 2 network cards - one host-only (vboxnet0) adapter enp0s8 (which I want to be static) and the other the NAT adapter enp0s3. The host-only adapter never comes active on boot and I've to always run ifup to bring it up. NAT is active on boot.



I've already added ONBOOT="yes" in /etc/sysconfig/network-scripts/ifcfg-enp0s8. The contents of /etc/sysconfig/network-scripts/ifcfg-enp0s8 is given below:



TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.56.101
NETMASK=255.255.255.0
NM_CONTROLLED=no
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=451a1700-6a0f-430a-b5ac-96fe2bf748b3
DEVICE=enp0s8
ONBOOT="yes"


Contents of /etc/sysconfig/network-scripts/ifcfg-enp0s3



TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
#PEERDNS="yes"
IPV4_FAILURE_FATAL="no"
#IPV6INIT="yes"
IPV4_AUTOCONF="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="b5ee8854-996e-44dc-9548-f6a1f1afa3b2"
DEVICE="enp0s3"
ONBOOT="yes"
DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=192.168.0.1
PEERDNS=yes
PEERROUTES=yes
IPV6INIT=no


What might be the problem?










share|improve this question
























  • I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

    – tomd
    Feb 26 '17 at 15:23















1















I've installed CentOS7 in virtual box. I've 2 network cards - one host-only (vboxnet0) adapter enp0s8 (which I want to be static) and the other the NAT adapter enp0s3. The host-only adapter never comes active on boot and I've to always run ifup to bring it up. NAT is active on boot.



I've already added ONBOOT="yes" in /etc/sysconfig/network-scripts/ifcfg-enp0s8. The contents of /etc/sysconfig/network-scripts/ifcfg-enp0s8 is given below:



TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.56.101
NETMASK=255.255.255.0
NM_CONTROLLED=no
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=451a1700-6a0f-430a-b5ac-96fe2bf748b3
DEVICE=enp0s8
ONBOOT="yes"


Contents of /etc/sysconfig/network-scripts/ifcfg-enp0s3



TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
#PEERDNS="yes"
IPV4_FAILURE_FATAL="no"
#IPV6INIT="yes"
IPV4_AUTOCONF="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="b5ee8854-996e-44dc-9548-f6a1f1afa3b2"
DEVICE="enp0s3"
ONBOOT="yes"
DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=192.168.0.1
PEERDNS=yes
PEERROUTES=yes
IPV6INIT=no


What might be the problem?










share|improve this question
























  • I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

    – tomd
    Feb 26 '17 at 15:23













1












1








1








I've installed CentOS7 in virtual box. I've 2 network cards - one host-only (vboxnet0) adapter enp0s8 (which I want to be static) and the other the NAT adapter enp0s3. The host-only adapter never comes active on boot and I've to always run ifup to bring it up. NAT is active on boot.



I've already added ONBOOT="yes" in /etc/sysconfig/network-scripts/ifcfg-enp0s8. The contents of /etc/sysconfig/network-scripts/ifcfg-enp0s8 is given below:



TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.56.101
NETMASK=255.255.255.0
NM_CONTROLLED=no
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=451a1700-6a0f-430a-b5ac-96fe2bf748b3
DEVICE=enp0s8
ONBOOT="yes"


Contents of /etc/sysconfig/network-scripts/ifcfg-enp0s3



TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
#PEERDNS="yes"
IPV4_FAILURE_FATAL="no"
#IPV6INIT="yes"
IPV4_AUTOCONF="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="b5ee8854-996e-44dc-9548-f6a1f1afa3b2"
DEVICE="enp0s3"
ONBOOT="yes"
DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=192.168.0.1
PEERDNS=yes
PEERROUTES=yes
IPV6INIT=no


What might be the problem?










share|improve this question
















I've installed CentOS7 in virtual box. I've 2 network cards - one host-only (vboxnet0) adapter enp0s8 (which I want to be static) and the other the NAT adapter enp0s3. The host-only adapter never comes active on boot and I've to always run ifup to bring it up. NAT is active on boot.



I've already added ONBOOT="yes" in /etc/sysconfig/network-scripts/ifcfg-enp0s8. The contents of /etc/sysconfig/network-scripts/ifcfg-enp0s8 is given below:



TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.56.101
NETMASK=255.255.255.0
NM_CONTROLLED=no
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s8
UUID=451a1700-6a0f-430a-b5ac-96fe2bf748b3
DEVICE=enp0s8
ONBOOT="yes"


Contents of /etc/sysconfig/network-scripts/ifcfg-enp0s3



TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
#PEERDNS="yes"
IPV4_FAILURE_FATAL="no"
#IPV6INIT="yes"
IPV4_AUTOCONF="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="b5ee8854-996e-44dc-9548-f6a1f1afa3b2"
DEVICE="enp0s3"
ONBOOT="yes"
DNS1=8.8.8.8
DNS2=8.8.4.4
DNS3=192.168.0.1
PEERDNS=yes
PEERROUTES=yes
IPV6INIT=no


What might be the problem?







centos networking virtualbox route






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 16 at 21:54









Rui F Ribeiro

39.8k1479133




39.8k1479133










asked Mar 16 '16 at 16:01









RonRon

202212




202212












  • I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

    – tomd
    Feb 26 '17 at 15:23

















  • I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

    – tomd
    Feb 26 '17 at 15:23
















I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

– tomd
Feb 26 '17 at 15:23





I know I am late to this party. I had a similar problem with a host-only adapter in Centos7. It turned out that the Mac address in /etc/sysconfig/network-scripts/ifcfg-enp0s8 (HWADDR="xx:xx:xx:xx:xx:xx") was different to that shown in the VirtualBox GUI (Centos7-> Settings-> Network -> Adapter2 -> Advanced -> Mac address). Got the inspiration when reading your question :)

– tomd
Feb 26 '17 at 15:23










1 Answer
1






active

oldest

votes


















0














Change the Host-only interface from enp0s8 to enp0s9. Enp0s8 is innet always, enp0s9 is the host-only. It will work.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f270231%2fhost-only-network-adapter-enp0s8-not-starting-on-boot-in-centos7%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Change the Host-only interface from enp0s8 to enp0s9. Enp0s8 is innet always, enp0s9 is the host-only. It will work.






    share|improve this answer



























      0














      Change the Host-only interface from enp0s8 to enp0s9. Enp0s8 is innet always, enp0s9 is the host-only. It will work.






      share|improve this answer

























        0












        0








        0







        Change the Host-only interface from enp0s8 to enp0s9. Enp0s8 is innet always, enp0s9 is the host-only. It will work.






        share|improve this answer













        Change the Host-only interface from enp0s8 to enp0s9. Enp0s8 is innet always, enp0s9 is the host-only. It will work.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 16 at 16:47









        BaronBaron

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f270231%2fhost-only-network-adapter-enp0s8-not-starting-on-boot-in-centos7%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?