VirtualBox Centos7 machine has no IP address when host is connected on WiFi instead of LAN

So I have a CentOS 7 (minimal inst) VM on VirtualBox with Bridged Adapter network configuration, on my laptop (host). Whenever I have my laptop (host) connected on WiFi, there is no IP address assigned in the network interface of my CentOS VM (guest). When I plug my laptop (host) via a cable into my router then I get assigned an IP address on my CentOS VM (guest). I should note that when on WiFi, my laptop (host) has an IP address and also internet connection.

Is it even possible to get an IP address on the VM (guest) when my laptop (host) is connected to WiFi?

Thank you

EDIT: As @Didier suggested the fix lies in the network configuration. To be more precise:

Settings -> Network -> Name

And chose the name of the adapter you want your VM to connect to (or in this case "bridge to"). For me the name was "Intel(R) Dual Band Wireless", it can be different in other laptop models/brands.

0

1 Answer

The answer posted here by @jakesantos seems to have solved the OP's problem.

  1. Open Virtualbox Manager
  2. Select the machine you cannot get internet on in the left pane
  3. Click the Settings button in the top menu
  4. Click Network in the left pane in the settings window
  5. Switched to Bridged Adapter in the Attached to drop-down menu
  6. Select the name of the network adapter you are currently using on your host machine. I am using wireless so I chose eth0 which is my wireless network adapter. You can check which adapter you are currently using by opening the terminal (CTRL+ALT+T by default) and running ifconfig. It will probably be the eth adapter that shows an inet addr and shows data transfer next to RX bytes.
  7. Under Advanced, make sure the machine is using the Desktop Adapter Type
  8. Under Advanced, make sure Promiscuous Mode is set to Allow VMs
  9. Under Advanced, make sure Cable connected is checked on
  10. Hit OK to save your changes
  11. Start your VM

This is an image showing an example of the settings you need (taken from this answer).

Virtualbox Network Settings

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like