VM APT-GET not working in bridged mode please help?

I am running Ubuntu server 16.04 in virtualbox and for some reason when in bridged mode apt-get just sits a 0% and never goes anywhere. This isn't an issue in NAT mode. Does any one know whats going on? Note: I can ping google.com in both modes...

Does network work at all in that VM and bridged mode or is it just apt-get?

If it is general network problem that occurs in that VM and bridged mode then it is most likely situation that I had several times with VMWare Workstation and once with Virualbox (that I use very rarely) . Because of hardware or software change in the host (I use VMWare on Windows) Vmware lost settings regarding which NIC should be used as default for bridge (in my case it is sometimes a matter of enabling VMWare bridge protocol on the NIC or in VMWare settings to choose correct NIC as a default - sometimes auto select disappoints me).

I can imagine that similar thing could happen with Linux host.

Also check if your local network router/gateway did not hit some kind of security issue with the virtual machine appearing in the network as a full independent participant (e.g. office network might reject unknown machines) - just in case you do work in more protected environment.

Yeah nope this is the strange part.
I can ping google no worries in both NAT and Bridged mode.
APT-GET just sits at 0% when using bridged mode

Do you have DNS set up properly? Or if you changed from NetworkManager.service to network.service, sometimes network manager keeps resolv.conf locked. This is the file where the nameserver is, usually 8.8.8.8. Just go to the folder where resolv conf is located and type "ls -al" and look if network manager is linking to resolv.conf

EDIT: Sorry, I just realised you are using virtualboc on windows, I am only used to linux hosts.

1 Like

Hmm so I left it for a few hrs and it seemed to complete .
The next time I tried apt it worked fine.
Not sure what was going on.