I have set up a Host-only network in VirtualBox, and created a brand new VM with Ubuntu 14.04.5 Server installed. My goal is to give the Ubuntu server a static IP address which will not change if I move to a different location with a different physical network.
In VirtualBox, using File > Preferences > Network > Host-only Networks, I created a new network: vboxnet0
Adapter
IPv4 Address: 10.1.1.1
IPv4 Network Mask: 255.255.255.0
IPv6 Address: fe80:0000:0000:0000:0800:27ff:fe00:0000
IPv6 Network Mask Length: 6
DHCP Server
[x] Enable Server
Server Address: 10.1.1.100
Server Mask: 255.255.255.0
Lower Address Bound: 10.1.1.101
Upper Address Bound: 10.1.1.254
(I don't need to use the DHCP server, so I have tried with it both enabled and disabled, with the same lack of success.)
I set the Network for the Ubuntu server VM to:
Adapter 1: Bridged Adapter, wlan 0
Adapter 2: (enabled) Host-only Adapter, vboxnet0 (default settings)
When I launch the server and run ifconfig, I see only entries for eth0 with an inet addr of 192.168.1.18 (provided by the Bridged Adapter) and lo with an inet addr of 127.0.0.1.
When using a Desktop version of Ubuntu 14.04, I also see an entry for eth1
, with an inet addr
in the range 10.1.1.x, and I can configure this to be the static address that I want. With Ubuntu 14.04 Server, I do not see the eth1
network.
In the Ubuntu server, I have edited /etc/network/interfaces
as follows:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 10.1.1.2
netmask 255.255.255.0
I have also tried eth1
with various combinations of:
network 10.1.1.0
gateway 10.1.1.1
broadcast 10.1.1.25
When I run sudo ifup eth1
, the output is:
RTNETLINK answers: File exists
Failed to bring up eth1
Does this mean that the Ubuntu virtual machine cannot see the 10.1.1.x network? Is there a command that allows me to check what networks are available?
Is there something else I need to set somewhere to make the Host-only Network visible for the VM?
0 Answers