No internet access in VM

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

No internet access in VM

Post by Estarossa1 »

Hi today i am having this issue and i have no idea what i have done to cause it.
I tether my android samsung s8+ phone to my computer and use that connection for my virtual machine which has windows 7 installed. It has worked fine a long time. I even reinstalled my samsung android usb drivers on my PC. But whenever i go in my VM the connection always has that yellow question mark and "no internet access". in the screenshot i've attached when i click status on my network adapter connection, it says ipv6 no internet access. How do i fix this?
I have tried these things but they have not helped:
Reset Winsock And TCP/IP
Release And Renew Your IP Configuration Settings
Disable IP Helper Service
Disable IPv6
They however have not helped and i still can't get internet access in my VM. i have tried different VM's but they all have the same problem so it's obvious the issue is with the connection/network rather than the virtual machine which has not had its configurations changed ever. It has always been bridged adapter and worked fine. Also there is virtualbox hostonly network 1# and also a #2 enabled which i think has always been enabled as far as i know. I did recently install windows docker container but uninstalled that to make sure it wasn't causing any issue so i don't think that's it either. Also one thing to note is that in my original host O.S, the mobile data tether connection works fine, it's only when i use the vm that it gives me the no internet access error and doesn't work.
Any help is appreciated, thanks.
Attachments
Screenshot_46.png
Screenshot_46.png (23.11 KiB) Viewed 4916 times
Screenshot_48.png
Screenshot_48.png (59.9 KiB) Viewed 4916 times
Screenshot_45.png
Screenshot_45.png (66.23 KiB) Viewed 4918 times
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: No internet access in VM

Post by BillG »

No IPv6 is probably a red herring. It would expect your Internet access to be IPv4.

If you are using bridged networking, what NIC in the host are you bridging to? What IP does that NIC have? What IP address does your vm have?

There is no point in hiding private addresses (such as 192.168.x.x) . They are not unique - anyone can use them.
Bill
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

Re: No internet access in VM

Post by Estarossa1 »

BillG wrote:No IPv6 is probably a red herring. It would expect your Internet access to be IPv4.

If you are using bridged networking, what NIC in the host are you bridging to? What IP does that NIC have? What IP address does your vm have?

There is no point in hiding private addresses (such as 192.168.x.x) . They are not unique - anyone can use them.
Yes i'm using bridged networking as i always have. I am bridging to the samsung interface that i usually connect to that is basically the mobile tethering from my 4g mobile data to the computer. It's always worked before no issue.
The IPV4 i get when i run it via cmd on my host O.S with the samsung interface enabled and other connections disabled is: 192.168.99.1, this is with cmd but when i right click status on the actual network and show details, it gives me 192.168.42.197
Inside VM i get ipv4 address: 192.168.42.226
default gateway 192.168.42.129
are they supposed to be the same?
Attachments
Screenshot_50.png
Screenshot_50.png (32.31 KiB) Viewed 4897 times
Screenshot_49.png
Screenshot_49.png (102.83 KiB) Viewed 4898 times
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: No internet access in VM

Post by BillG »

No, they should not be the same, but the host and guest configs should have IPs in the same IP subnet and have the same netmask and default gateway (which they do). If the host can access the Internet from 192.168.42.197, the guest should do the same from 192.168.42.226 . That all looks fine.

The 192.168.99.1 address is a host only adapter, which has nothing at all to do with Internet access. If you are not using them, you can disable the host-only adapters (from the host OS adapter options), so you only see the bridged network IP.
HostOnly.PNG
Bill
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

Re: No internet access in VM

Post by Estarossa1 »

BillG wrote:No, they should not be the same, but the host and guest configs should have IPs in the same IP subnet and have the same netmask and default gateway (which they do). If the host can access the Internet from 192.168.42.197, the guest should do the same from 192.168.42.226 . That all looks fine.

The 192.168.99.1 address is a host only adapter, which has nothing at all to do with Internet access. If you are not using them, you can disable the host-only adapters (from the host OS adapter options), so you only see the bridged network IP.
HostOnly.PNG
I see, so what's causing the issue and how do i go about fixing it?
Also wroth mentioning that when i use my normal internet connection through the vm, it works fine. So for some reason the virtual machine is not accepting the mobile tethered connection correctly. Maybe it's due to ip but you said that's fine so i'm not sure what else it could be.
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

Re: No internet access in VM

Post by Estarossa1 »

I've tried reinstalling virtualbox and samsung android usb drivers but nothing seems to work. I just don't understand what the issue is. If it's not the ip, why does it not work? it's driving me crazy and i need it working asap because i have work to do
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No internet access in VM

Post by scottgus1 »

It is a little hard following your pictures.

Please Right-click the guest in the main Virtualbox window's guest list, choose Show in Explorer. Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.

Also, set up your android link, start the guest, then post the text outputs of "ipconfig /all" and "ping 8.8.8.8" (as text not pictures) from the host and guest.

Finally please post the text output of ' "c:\program files\oracle\virtualbox\vboxmanage.exe" list hostonlyifs ', as text not pictures.
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

Re: No internet access in VM

Post by Estarossa1 »

scottgus1 wrote:It is a little hard following your pictures.

Please Right-click the guest in the main Virtualbox window's guest list, choose Show in Explorer. Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.

Also, set up your android link, start the guest, then post the text outputs of "ipconfig /all" and "ping 8.8.8.8" (as text not pictures) from the host and guest.

Finally please post the text output of ' "c:\program files\oracle\virtualbox\vboxmanage.exe" list hostonlyifs ', as text not pictures.
Thank you for your reply, it's now fixed. I just connected my phone again and this time it asked me "allow this device to access phone data" on my phone and i clicked okay and that seemed to have fixed it. This seems obvious but it has not asked me this before even though i've disconnected and reconnected several times today, and i suspect that i somehow unknowingly deleted samsung usb driver files or the driver itself (thanks to CCleaner) which originally caused this issue and so reinstalling it has made the setting forget that access is allowed. It's weird that it did not ask this the many times that i tried beforehand when it obviously should have done so the moment i reinstalled my drivers. Unfortunately i can only think it's simply buggy and maybe my phone is at fault, but thank you for your response.
Attachments
aveng1.zip
(1.84 KiB) Downloaded 7 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No internet access in VM

Post by scottgus1 »

Great! Glad you're up and running.
Estarossa1
Posts: 8
Joined: 31. Jan 2020, 02:06

Re: No internet access in VM

Post by Estarossa1 »

scottgus1 wrote:Great! Glad you're up and running.
I won't waste any more of your time but i do find it confusing. Since if the issue was that access wasn't allowed, why was the tether working fine on my host o.s but only my VM was not allowed access? Somehow the phone recognizes the VM and is only giving access to my host O.S? that doesn't seem right. oh well no point thinking about it, it's fixed is all that matters.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: No internet access in VM

Post by BillG »

I think the most likely explanation is that something went wrong at the phone end, and you simply needed to delete the connection and start again.

The vm would not be aware of this, so its settings would be unchanged - it would look just as it did when it was working. The same thing happens on a physical machine if the problem is somewhere between it and the Internet access point. It all looks fine but no access to the Internet.
Bill
Post Reply