In VirtualBox VM, why does Ubuntu Server 14.04 not pick up the two network adapters but `network-manager` does?

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








up vote
0
down vote

favorite












These days I've been installing our product to a colleague's laptop which runs Windows 10. I installed VirtualBox 5.2.10 and a virtual machine that runs Ubuntu Server 14.04.5, and then installed our product in the VM.



I wanted to configure the VM network as follows:



  • Network Adapter #1 uses NAT, so the VM has Internet access.

  • Network Adapter #2 uses host-only adapter, so only the host machine can talk to the VM.

When I enabled two network adapters in the VM's Settings in VirtualBox, for some reason, only one (the adapter #1) can be recognized in Ubuntu Server 14.04. With the configuration above, that would be the NAT; if I switched and made adapter #1 the host-only adapter, it would be the host-only adapter recognized.



I thought it was because there was only one network interface (eth0, which was the adapter #1) described in /etc/network/interfaces. I edited it and added eth1 for adapter #2, and it seemed to work.



Later my other colleagues told me I should have installed network-manager package which is installed by default on Ubuntu Desktop 14.04 but not installed on Ubuntu Server 14.04. To test this suggestion, I removed the eth1 configuration from the /etc/network/interfaces file (so it again only had eth0). Then I ran apt-get install network-manager, and all of a sudden, both network adapters could be recognized.



So I was confused because I couldn't figure out how network-mananger magically found both network cards and made them work:



  • With network-manager installed, I checked /etc/network/interfaces file and was sure it didn't automatically add eth1 there. There was only eth0.

  • I also looked into /etc/NetworkManager/system-connections/ because this is where network-manager maintains the connection configuration, but it was empty.

  • The only place I guess where the magic happened is the /etc/init.d/networking. But, firstly, to my best knowledge, this script was not installed by network-manager, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (or eth1) could be automatically found and made work.

Although with the help of network-manager I could set up the VM network correctly, I am still curious why network-manager could work. Did I overlook something? Could anyone give me a hint where I should look at? Thanks!







share|improve this question
























    up vote
    0
    down vote

    favorite












    These days I've been installing our product to a colleague's laptop which runs Windows 10. I installed VirtualBox 5.2.10 and a virtual machine that runs Ubuntu Server 14.04.5, and then installed our product in the VM.



    I wanted to configure the VM network as follows:



    • Network Adapter #1 uses NAT, so the VM has Internet access.

    • Network Adapter #2 uses host-only adapter, so only the host machine can talk to the VM.

    When I enabled two network adapters in the VM's Settings in VirtualBox, for some reason, only one (the adapter #1) can be recognized in Ubuntu Server 14.04. With the configuration above, that would be the NAT; if I switched and made adapter #1 the host-only adapter, it would be the host-only adapter recognized.



    I thought it was because there was only one network interface (eth0, which was the adapter #1) described in /etc/network/interfaces. I edited it and added eth1 for adapter #2, and it seemed to work.



    Later my other colleagues told me I should have installed network-manager package which is installed by default on Ubuntu Desktop 14.04 but not installed on Ubuntu Server 14.04. To test this suggestion, I removed the eth1 configuration from the /etc/network/interfaces file (so it again only had eth0). Then I ran apt-get install network-manager, and all of a sudden, both network adapters could be recognized.



    So I was confused because I couldn't figure out how network-mananger magically found both network cards and made them work:



    • With network-manager installed, I checked /etc/network/interfaces file and was sure it didn't automatically add eth1 there. There was only eth0.

    • I also looked into /etc/NetworkManager/system-connections/ because this is where network-manager maintains the connection configuration, but it was empty.

    • The only place I guess where the magic happened is the /etc/init.d/networking. But, firstly, to my best knowledge, this script was not installed by network-manager, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (or eth1) could be automatically found and made work.

    Although with the help of network-manager I could set up the VM network correctly, I am still curious why network-manager could work. Did I overlook something? Could anyone give me a hint where I should look at? Thanks!







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      These days I've been installing our product to a colleague's laptop which runs Windows 10. I installed VirtualBox 5.2.10 and a virtual machine that runs Ubuntu Server 14.04.5, and then installed our product in the VM.



      I wanted to configure the VM network as follows:



      • Network Adapter #1 uses NAT, so the VM has Internet access.

      • Network Adapter #2 uses host-only adapter, so only the host machine can talk to the VM.

      When I enabled two network adapters in the VM's Settings in VirtualBox, for some reason, only one (the adapter #1) can be recognized in Ubuntu Server 14.04. With the configuration above, that would be the NAT; if I switched and made adapter #1 the host-only adapter, it would be the host-only adapter recognized.



      I thought it was because there was only one network interface (eth0, which was the adapter #1) described in /etc/network/interfaces. I edited it and added eth1 for adapter #2, and it seemed to work.



      Later my other colleagues told me I should have installed network-manager package which is installed by default on Ubuntu Desktop 14.04 but not installed on Ubuntu Server 14.04. To test this suggestion, I removed the eth1 configuration from the /etc/network/interfaces file (so it again only had eth0). Then I ran apt-get install network-manager, and all of a sudden, both network adapters could be recognized.



      So I was confused because I couldn't figure out how network-mananger magically found both network cards and made them work:



      • With network-manager installed, I checked /etc/network/interfaces file and was sure it didn't automatically add eth1 there. There was only eth0.

      • I also looked into /etc/NetworkManager/system-connections/ because this is where network-manager maintains the connection configuration, but it was empty.

      • The only place I guess where the magic happened is the /etc/init.d/networking. But, firstly, to my best knowledge, this script was not installed by network-manager, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (or eth1) could be automatically found and made work.

      Although with the help of network-manager I could set up the VM network correctly, I am still curious why network-manager could work. Did I overlook something? Could anyone give me a hint where I should look at? Thanks!







      share|improve this question












      These days I've been installing our product to a colleague's laptop which runs Windows 10. I installed VirtualBox 5.2.10 and a virtual machine that runs Ubuntu Server 14.04.5, and then installed our product in the VM.



      I wanted to configure the VM network as follows:



      • Network Adapter #1 uses NAT, so the VM has Internet access.

      • Network Adapter #2 uses host-only adapter, so only the host machine can talk to the VM.

      When I enabled two network adapters in the VM's Settings in VirtualBox, for some reason, only one (the adapter #1) can be recognized in Ubuntu Server 14.04. With the configuration above, that would be the NAT; if I switched and made adapter #1 the host-only adapter, it would be the host-only adapter recognized.



      I thought it was because there was only one network interface (eth0, which was the adapter #1) described in /etc/network/interfaces. I edited it and added eth1 for adapter #2, and it seemed to work.



      Later my other colleagues told me I should have installed network-manager package which is installed by default on Ubuntu Desktop 14.04 but not installed on Ubuntu Server 14.04. To test this suggestion, I removed the eth1 configuration from the /etc/network/interfaces file (so it again only had eth0). Then I ran apt-get install network-manager, and all of a sudden, both network adapters could be recognized.



      So I was confused because I couldn't figure out how network-mananger magically found both network cards and made them work:



      • With network-manager installed, I checked /etc/network/interfaces file and was sure it didn't automatically add eth1 there. There was only eth0.

      • I also looked into /etc/NetworkManager/system-connections/ because this is where network-manager maintains the connection configuration, but it was empty.

      • The only place I guess where the magic happened is the /etc/init.d/networking. But, firstly, to my best knowledge, this script was not installed by network-manager, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (or eth1) could be automatically found and made work.

      Although with the help of network-manager I could set up the VM network correctly, I am still curious why network-manager could work. Did I overlook something? Could anyone give me a hint where I should look at? Thanks!









      share|improve this question











      share|improve this question




      share|improve this question










      asked May 10 at 20:07









      yaobin

      1237




      1237

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034640%2fin-virtualbox-vm-why-does-ubuntu-server-14-04-not-pick-up-the-two-network-adapt%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034640%2fin-virtualbox-vm-why-does-ubuntu-server-14-04-not-pick-up-the-two-network-adapt%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Which professions warranted travel in Medieval times?

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          Trouble downloading packages list due to a “Hash sum mismatch” error