MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Anne-Sophie
Posts: 5
Joined: 22. Jan 2022, 21:23

MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by Anne-Sophie »

Subject: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Hello friends VirtualBox,

Problem scenario
I as a beginner upgraded my MacOs host to Monterey and I lost my wifi connection. Thus I was not able to update my client host (e.g. Ubuntu server). For example I could not ping or updating by "sudo apt update" as there was no Internet connection. I did not have a cable for the Ethernet.


Quick fix - temporary solution
However I found a quick fix as a temporary solution for making updates by connecting instead by my mobile phone and USB cable.

Credit to Shambhu Nath Mishra Youtube tutorial: How to Enable Virtual Box host-only adapter(Error:No host-only Adapters currently selected)
Hava a look at it, please?

STEPS

1. Open Virtual Box.

2. Go to Network settings and select "Host only" in Tab 1 and checkbox Enable Network adapter.
The other tabs are not enabled. In tab 1 you are having an error message saying "invalid setting detected". How to fix it?

3. In Virtual Box: FILE -> host Network manager

4. Select CREATE

5. Scroll down to tabs ADAPTER (TAB) and DHCP Server (TAB) to view

6. Fix Lower address bound in DHCP Server (TAB) set to the same value as IPv4 adress in ADAPTER (TAB)
IPv4 address.

7. Click CLOSE

8. Start your guest host (e.g. Ubuntu) so the terminal windows start in Virtual Box.

9. if stil no internet connection? Then, stil in the same running terminal window:
Go to Network button in the bottom bar and select Network Settings -> change to Bridget Adopter (i)Phone USB.

10. Click: OK

11. Test your internet connection with a ping e.g.: ping Ubuntu

Working? Job done! :-)

No I can update my guest host (Ubuntu) (Sudo apt update)

Happy coding!

Anne-Sophie
/// By a beginner for beginners as a quick fix for a temporary solution to get Internet connection ///
Anne-Sophie
Posts: 5
Joined: 22. Jan 2022, 21:23

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by Anne-Sophie »

P.S. Please you need to check your guest host ip after connecting with your new host network manager as above: hostname -i
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by granada29 »

I am wondering if you had tried changing your WiFi interface from Bridged to NAT in the VM settings. That should give you a working interface with internet connectivity and no need to set up the iPhone connection (unless that is your only way to connect to the internet from your host).

I am genuinely curious and no criticism of what you achieved.
Anne-Sophie
Posts: 5
Joined: 22. Jan 2022, 21:23

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by Anne-Sophie »

Hi granada29,


Thank you for your kindly inquiry. My answer is that my personal research as beginner and the aim of this "quick fix" tutorial was only written as simple possible reconnect to the Internet using mobile and USB cable after losing adaptor Bridge wifi after upgrading to MacOs Monterey. I needed a quick way to the Internet. I was reading some posts here about related "Bridged to NAT" like "Bridged Adapter not working", "Bridging & Wifi - Supported hardware" and "Virtualbox Networks: In Pictures" - Links bellow* - but I did not find it easy as a beginner... :-)

Do you want to help?
May I ask you if you would like to help me and other beginners to write a tutorial with easy numbered steps (1, 2, 3,..) regarding what you propose on how to "changing your WiFi interface from Bridged to NAT in the VM settings", please?

Like "changing your WiFi interface from Bridged to NAT in the VM settings" - Requirements - STEPS 1) , 2) 3) etc?

Again thank you for your kindly inquiry. Looking forward to hear from you. Have a nice day!

Kind regards,

Anne-Sophie

*
Bridged Adapter not working
viewtopic.php?f=8&t=88980

Bridging & Wifi - Supported hardware
viewtopic.php?f=1&t=56236

Internet not working in guest using Bridged mode
viewtopic.php?f=8&t=104698&p=510686&hilit=wifi#p510686

Virtualbox Networks: In Pictures
viewtopic.php?f=35&t=96608#p468775
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by granada29 »

I think @scottgus1 has already written a very good tutorial explaining the various VirtualBox network settings. You have referenced his guide at Virtualbox Networks: In Pictures.

To apply these settings to a VM is pretty straightforward for the most part.

1. Shutdown the VM - power off and not in a saved state.
2. Open the VM settings in VirtualBox Manager
3. Select Network from the toolbar icons
4. Choose the adapter you wish to configure. If you only require a single network interface for the VM then Adapter 1 is a good choice
5. Check the 'Enable Network Adapter' check box.
6. Select your networking mode from the Attached to popup menu - NAT is the default setting for a new VM.
7. Choose the physical interface that will be used from the Name popup menu - the contents of this pop menu are dependent on your hardware configuration.
8. Click the OK button.
9. Start your VM
Anne-Sophie
Posts: 5
Joined: 22. Jan 2022, 21:23

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by Anne-Sophie »

Hi granada29,

Thank you for your kindly help. Here has been a busy week. Now I am only a beginner using VirtualBox, but I will now try your tutorial.

Requirements?
How about requriements? Do one need to have something installed or cable connected or something else?

I tried your tutorial and steps 1-6 went well.

May I ask you if you would like to help me the beginner, please?

Problem: At step 7 and "Choose the physical interface that will be used from the Name popup menu" - here my Name pop up menu is greyed out -disabled.

Promiscuous Mode pop-up menu bellow having Deny as a value is also greyed out and disable.

My computer is an iMac with Monterey. I am connected by wifi. I use an external hard drive for my client host (Ubuntu server). Please advise.

Looking forward to hear from you. Have a nice day!

Kind regards,

Anne-Sophie
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by granada29 »

@Anne-Sophie

I just tried this out. My instructions above are WRONG and there is no Step 7. As you rightly point out, interface selection is disabled for NAT.

I was able to run a linux VM by just following steps 1 - 6 and am currently upgrading it to Debian Bullseye. Internet access is fine.

I hope that helps.
Anne-Sophie
Posts: 5
Joined: 22. Jan 2022, 21:23

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by Anne-Sophie »

@granada29

Unfortunately, my guest host (Ubuntu Server) is not able to connect to the internet (wifi) after your steps 1-6.

Please may I ask you for help, please?

Did you install a new guest host "Linux VM" after upgrading to MacOs Monterey?
Or, did you after upgrading to Monterey reconnected your guest host "Linux VM"?

Did you lose your wifi for your guest host when upgrading to MacOs Monterey?

After starting my guest host (Ubuntu Server) I get following errors for my Internet connection my for guest host (Ubuntu Server) in Terminal window:

Stops running at
"Reached target Host and Network Name Lookups.

A start job is running for wait for Network to be configured (2 min Xs / no limit)"

After a while continues without solving the job?


After login on client server

When running Sudo apt update

the error message: -
Temporary failure in resolving ' .net'
Ping gives the error message: -
"temporary failure in name resolution"
Conclusion
Its seems guest client does not having any working Internet connection?

May I ask you for advice as a beginner, please? Do you have an idea what is wrong and what you may might propose, please?

Problem scenario
I as a beginner upgraded my MacOs host to Monterey and I lost my wifi connection. Thus I was not able to update my client host (e.g. Ubuntu server). For example I could not ping or updating by "sudo apt update" as there was no Internet connection. I do not have a cable for the Ethernet.

My computer is an iMac with Monterey. I am connected by wifi. I use an external hard drive for my client host (Ubuntu server). I gave Virtual Box as well full disk access System Preferences on MacOs (Monterey). Please advise.

Looking forward to hear from you. Have a nice weekend!

Kind regards,

Anne-Sophie
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by granada29 »

I tested NAT over WiFi by making these changes to my host (iMac 18,3 with Monterey 12.2):
1) Disconnect the ethernet cable
2) Enable WiFi and connect to a wifi network

After verifying that the host had network connectivity I modified an existing Debian VM to use NAT in place of Bridged networking.
When I started the VM, I had to make no changes at all for it to have network access, although it was no longer reachable (because of NAT) from the host.

It seems as though your VM is having difficulty finding an interface.
In your guest OS, please provide a listing of your network interfaces.
either:
1) ifconfig - if you have it installed
or 2) ip addr

Please note that in the guest OS, you should receive an ethernet interface, even though externally you are using WiFi. Don't try to configure your guest as though it has a WiFi interface.

Also, be aware of the silly rules about predictable naming of network interfaces in Linux. In my experience these predictable names are anything but predictable and I disable them, sticking with the old fashioned names (i.e. eth0, eth1 etc). There are many guides on the internet of how to do this.
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: MacOs Monterey Beginners help quick fix reconnecting to Internet by Network adapter bridge

Post by granada29 »

One more thing.

The interface in your VM should be receiving it's address via dhcp. If you have assigned a static IP to the interface, that will not work under VirtualBox NAT.
Post Reply