Oracle Virtualbox Tips
Connect to a guest OS
from other machines. (Updated: 2016-8-2(Tue))
- I would like to have a server on a guest OS, so I would like
to connect to it from other machines on LAN.
- My environment is Windows 7 (Host OS) and Kubuntu 16.04 (Guest
OS), and run repository servers and so forth on the guest machine.
- Two set up are needed.
- Make the gust OS visible from other machines
- Assign a (local) fix IP to the guest machine
1. Make the gust OS visible from other machines
- Environment: Virtual Box 5.0.26
- Select guest OS and right click -- Setting -- Network
- Select "bridge adapter"
- Note: in this tab, click "advanced" shows the MAC address of
virtual network adapter.
- Bridge adapter mode uses the host OS's network driver and filter
the packet from the physical driver. In this way, we can connect to
the guest OS, which has a virtual network device.
The manual entry of virtual box about bridge adapter.
2. Assign a (local) fix IP to the guest machine
- I use the DHCP server of my modem to set my guest OS (Linux)'s IP.
- Environment: O2 modem, German language
- Access to 192.168.1.1 with a browser
to open the model setup
- Log in to the modem (password required)
- Choose Heimnetz, LAN
- See the section "Feste IP-Adressen reservieren"
- Push "Neu"
- Note: It is simpler if your machine has already seen with
address assigned by DHCP. Otherwise you need to specify
the MAC address. (The virtual box's bridge adapter tab
shows the MAC address.)
- Choose your Gerätename and set IP Addresse.
- Check "Diese Regel aktivieren"
- Note 1: You can choose the existing IP address (another
machine is using), but this causes a trouble. It is
better to avoid it. The easy way is shutdown the machine
that has a IP address you want to use when you use the
DHCP to assign the IP address.
- Note 2: You cannot set the IP address outside the range
of IP-Startadresse and IP-Endadresse. The GUI allow to set
such address, but it ignored without any error (This is
not a behaviour of a high quality software).
- Check the Feste IP-Adressen aktivieren and wait to update the
- In some case, the status does't green check. But I just repeat
it, then it worked second time for me.
- Restart the Virtual machine. When restart the gurst host's
network, I obtained the new IP address, but, it becomes
"Unknown name" in the Übersicht. In order to solve
"Unknown name" in the Angeschlossenes Gerät, I needed to
restart the Guest host.
Guest OS cannot connect to the Internet via host Wifi connection
Copyright (C) 2016 Hitoshi Yamauchi
- When I use "bridge adapter" on a guest OS (Kubuntu 14.04), and the
host OS (Windows 7) using Wifi, the guest OS cannot connect to the
Internet. The error message of Network Manager is "IP configuration
- In this case, we can use NAT. Settings of the VirtualBox, network,
then, Attach to "NAT".
- The reason is most wireless adapters do not support promiscuous
mode. This means the Wifi connection only pass the packets which
has the host OS's IP address. Then, the guest OS's packets are not
visible. Thus, when the gust OS uses the NAT, then the gust OS can
connect to the outside of the host.
- Then this has a clear disadvantage, the outside cannot see the guest
OS's network adapter. The motivation to use the bridge is to see
the guest OS network adapter. The guest OS uses NAT, then the guest
is invisible. But, with a Wifi connection, the guest is usually
invisible. So, when I connect to the cable, I switch the guest to
the bridge, but using Wifi, I switch the guest to the NAT. Or, if I
don't need to see the guest OS, the I can use the NAT on the guest
- See the
virtualbox manual of the network section, bridge adapter