Unable to connect to internet from VirtualBox VM

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
SteverAugustus

Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Just starting my my Linux adventure. I've migrated from Mac back to PC and I need the Unix-like functionality for my work. I seem to have successfully installed Mint as a virtual machine using VirtualBox on my Windows 8.1 machine, but I'm having trouble connecting to the internet once I've made it. I've toyed around with the NAT, Bridged, and other settings (though I don't really know what those things mean, I just tried lots of them).

My understanding is that if my host machine is connected via WiFi, the virtual machine should connect to the internet through the host WiFi, but I'm not seeing that happening.

I know that isn't a lot of information; what more do I need to provide to help you guys help me?

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Just an update of what I've found since writing that. When in the VM, if I'm using NAT, I can ping 8.8.8.8, but I can't ping google.com or use the browser. From what I've read that means there's a DNS problem? I don't really know what that means though. Again, I can submit whatever it is that helps fix this problem, I'm just not sure what that would be.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

VB is designed, that any VM (regardless of its OS) gets automatically connected via the NAT adapter with the Internet. There is no need to "toy with the settings" to make that work; in the contrary, as long as you do not know, what you are doing you will likely break things.

Note, that even if your host is connected via WLAN your VM shows the connection with an ethernet adapter. This is the virtual network adapter.

If your host connects with the Internet fine and your VM does not I suspect, that the firewall in your W8.1 host (or any other security software) blocks it.

I recommend in your case to create a new VM, as it may be difficult to find out, what you have actually changed in the VM's setting. For experimenting it is enough to start in the new VM the live system of Mint.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Just tried that and got mildly (?) positive results. When I turned off all the firewall software and such, I still didn't get anything besides being able to ping 8.8.8.8. When I deleted my VM and made a new one, during the installation screen, however, the "Connected to the internet" box was checked in the beginning, whereas it has had a red X in all other cases when I've done this before. So when I was installing Mint, at least, it thought it was connected to the internet. Since reinstalling, however, I'm still seeing no results when I try to use the browser or ping google.com.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

I am not quite sure if I understood right: Did you say, that you was able in the live system inside the VM to connect to the Internet?
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Sorry for being unclear. In the installation process for Mint inside the VM, there is a screen that says:

"Preparing to install Linux Mint
For best results, please ensure that this computer:

has at least 8GB available drive space.
is plugged into a power source
is connected to the internet."

When my firewall was on, there was a red X next to the "is connected to the internet" line, but since I've turned it off, it is now a gray checkmark. So it looks like turning the firewall of did something, but the end result appears to be the same.

(it's the same screen as on this youtube video at 5:54 https://youtu.be/LmBjqjqCawc?t=354)
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

OK, this means the live system believed, that it was connected with the Internet.
Check this again:
Connect the ISO-file with Mint to the CD-connector of the same VM, launch the VM (it will boot with default settings automatically from the CD = ISO-file) and open firefox in the live-system. Does this work?

Back to the installed system: I suppose, that in the installed system the network indicator in your panel shows connection, do you confirm this?

As I have installed countless Mint systems as VMs and never have seen this (but with Mint also as host), I can only conclude, that the problem is somewhere in the host. If you can exclude blocking from the firewall I suppose, that your security software is responsible.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Trying to get online via firefox (or ping google.com) does not work in the live system either. In all cases, both the installed and live systems say that they are connected via wired connection.

I have turned all the security things off from my system. I suppose I can try dual booting instead of running a VM but I would prefer not to have to do that.

Thanks for all your help so far!
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

The new result means, that VB is internally connected with the network. You did not answer my question about the network indicator in the installed system, but I am rather sure, that is I supposed.

You might try the following - although I admit, that this does help only in seldom cases:
Inside your Mint-guest open the network settings and set the DNS-server for IPv4 manually. You can try the address of your rooter or e.g. 8.8.8.8 (Google) or 208.67.222.222 (OpenDNS). After that restart the VM.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Unfortunately that isn't helping either. Same results even if I do that. Sorry about not answering your question earlier. Yes, the network indicator says everything is connected.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

Not a big surprise, as I already wrote.

Another idea: As your are obviously connected using Iv4, disable IPv6 in the network settings completely. Sometimes this helps.

If this does not help, we try another attempt:
Add another network adapter for the VM (leave the NAT adapter untouched). Choose a bridged network and select the physical network adapter of your host, that you use.
After booting the VM try to connect to your host with your file manager. At best you should use the IP-address of the computer (e.g //IP/resource).
Also try now again to reach the Internet from the VM.
kwisher

Re: Unable to connect to internet from VirtualBox VM

Post by kwisher »

I believe you have to change the VB NIC to "bridged" mode to make a Internet connection.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

I tried the turn-off-IPv6 advice, as well as changing to "bridged" and neither fixed the issue.

I am a little confused about your next piece of advice, though. What do you mean connect to the host through the file manager? If I open the files window, there is a network button on the left. When I click on it and then click on the "WORKGROUP" icon it asks me to provide a password. I've inputted every password I can think would be relevant, to no avail, so I'm pretty confused.

Is this where I should be looking? I'm not entirely sure what I should be looking for here, or how I should use the IP address of my computer?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

If you want to connect via file manager to a resource, you need at first to setup a network share, if you do not have done this already. There you define a password, which you need to enter for a connection.

Easiest way: Right click in the file manager a folder, select sharing options and allow guest access, in this case no password is needed.

Probably needed to know: Which desktop environment do you use. If you don't know open a terminal and enter:

Code: Select all

inxi -S
Paste the output here.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

Okay, so I have successfully connected between the host and the guest. I followed the directions listed here, and managed to save a file in my host and have it accessible on the Desktop of my linux guest machine.

When I enter the command you suggested, I get the following:

Code: Select all

$ inxi -S
System:   Host: srckbos-VirtualBox  Kernel: 3.16.0-38-generic x86_64 (64 bit)
          Desktop: Cinnamon 2.6.11  Distro: Linux Mint 17.2 Rafaela
Unfortunately, still no internet.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

Sorry, that does not say anything, because the used method does not use your virtual network adapter.

Just another idea: You find in the help menu of the VB Manager the check for updates. Does it work or does it also get blocked?
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

When I do the check for updates in VB Manager, it does not work, and says:

The network operation failed with the following error: Unknown reason.

As far as doing what you describe about connecting over the virtual network adapter, sorry about that, i was still a little confused with how to do what you're describing. I'm with you as far right clicking a folder, selecting sharing options, and allowing guest access. But I wasn't able to find where or how to set up a network share. I can change the workgroup name and such on my host machine, but I don't see where the password goes anywhere, and although I can allow guest access on both sides, I don't see how I'm supposed to connect the two. When I am in the VM and in Windows Network from inside the File Manager, the only thing to click says WORKGROUP (which does not change if I change the workgroup name on my host machine), and it asks for a password but doesn't accept anything. Sorry for being dense but I am still pretty confused about that stuff.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

Forget the part about bridged network.

The result for the update check proofs, that the problem is in your host system. (Sorry, that I did not get this simple idea earlier.)
As I assumed already earlier, there is anything in your system which blocks at least VB to connect to the Internet. Consequently also the VMs are not able to connect.

We are now at a point where I cannot help you. Maybe a Windows forum is the better place seeking for help. My guess: any security software is running amok. So probably the support for your security software may also be a good place to ask for help.
SteverAugustus

Re: Unable to connect to internet from VirtualBox VM

Post by SteverAugustus »

I see. Will try to figure that out on the security and Windows side, then.

I appreciate all your help, so very much. If I figure it out I'll be sure to post what I ended up doing back on this thread.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to connect to internet from VirtualBox VM

Post by Cosmo. »

One thing to ad: You wrote in an earlier post, that you did turn off your security software. Note, that some software of this type does not really allow to turn off all functions and must be (at least temporarily) uninstalled.
Locked

Return to “Virtual Machines”