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


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 addeth1
there. There was onlyeth0
. - I also looked into
/etc/NetworkManager/system-connections/
because this is wherenetwork-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 bynetwork-manager
, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (oreth1
) 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!
14.04 networking server network-manager virtualbox-networking
add a comment |Â
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 addeth1
there. There was onlyeth0
. - I also looked into
/etc/NetworkManager/system-connections/
because this is wherenetwork-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 bynetwork-manager
, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (oreth1
) 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!
14.04 networking server network-manager virtualbox-networking
add a comment |Â
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 addeth1
there. There was onlyeth0
. - I also looked into
/etc/NetworkManager/system-connections/
because this is wherenetwork-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 bynetwork-manager
, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (oreth1
) 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!
14.04 networking server network-manager virtualbox-networking
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 addeth1
there. There was onlyeth0
. - I also looked into
/etc/NetworkManager/system-connections/
because this is wherenetwork-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 bynetwork-manager
, and, secondly, I skimmed the script but couldn't figure out how the network adapter #2 (oreth1
) 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!
14.04 networking server network-manager virtualbox-networking
asked May 10 at 20:07
yaobin
1237
1237
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password