Win 10 host, CentOS 9 virtual machine, no internet connection

Discussions related to using VirtualBox on Windows hosts.
Post Reply
SergeyUSA
Posts: 1
Joined: 19. May 2022, 00:19

Win 10 host, CentOS 9 virtual machine, no internet connection

Post by SergeyUSA »

Hey fellas,

I'm new to VirtualBox. I installed VirtualBox Version 6.1.34 r150636 (Qt5.6.2) on my Win 10 and then installed a CentOS 9 Workstation (I downloaded it from here: osboxes dot org -> centos -> centos-9-vbox).

My host PC is using Wi-Fi adapter to connect to my wireless home router. That's how I get access to the internet. On my Win 10 I get my IP address etc via DHCP. My Win 10 IP address is 192.168.1.154, mask is 255.255.255.0, gateway/DHCP is 192.168.1.1 and DNS is 192.168.1.1.

In my CentOS VM settings on the Settings tab I enabled Networkl Adapter and selected "Bridged Adapter" next to "Attached to" option. I selected my wireless adapter. In Advanced options I only enabled "Promiscuous Mode = Allow all" and checked that Cable Connected is also enabled.
VirtualBox internet 1.png
VirtualBox internet 1.png (30.83 KiB) Viewed 1953 times
Unfortunately my CentOS 9 VM doesn't have access to the internet. When I try to ping any web site like Google I get this: "Name or service not known".

When I run ifconfig command I get this result:
VirtualBox internet 2.jpg
VirtualBox internet 2.jpg (113.21 KiB) Viewed 1953 times
PS: Unfortunately I don't know what's the purpose of VirtualBox Host-Only Network adapter in Win 10, but it has these settings:
VirtualBox internet 3.jpg
VirtualBox internet 3.jpg (66.48 KiB) Viewed 1953 times
I already watched a few videos on YouTube but it didn't help. Please advise me on what should I check or which settings I should change.

Thank you.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Win 10 host, CentOS 9 virtual machine, no internet connection

Post by scottgus1 »

Thanks for the very complete description of your problem! The 'ifconfig' from your VM shows it's not getting an IP address.

For what each network type does, please see Virtualbox Networks: In Pictures. When you get to Bridged, you'll note there's a possible issue with Wi-Fi, and some options to try.
Post Reply