You are not logged in.

#1 2015-03-17 23:44:17

radu242
Member
Registered: 2009-03-15
Posts: 11

Maintaining internet connection with Arch in Virtualbox

Hi everyone, I am running Arch Linux in a Virtualbox with a Windows host. I frequently close my laptop and open it (as I move around my university campus), and while Windows picks up the change in Wi-Fi connection, it's sometimes hard to get the virtualized Arch to cooperate. I have tried both NAT and bridged modes (with two interfaces, a bridge for both wired and wireless) and neither seem to do the trick. What happens is, I'll open my laptop and find that Windows connects to my campus network fine. Then in the VM the internet disconnects. At this point, usually the internet reconnects after some time (which I find out by pinging google until it works), but sometimes it doesn't. In this case, I've tried restarting dhcpcd.service and network.target and neither works. Sometimes, rebooting the VM works and other times not even that works. The only surefire way is to power off the VM, toggle the network configuration between NAT or bridged, and start it.
As you can imagine, I'd rather not reboot my VM every time the internet connection is down. Does anyone have a solution to this annoying problem? Thanks

Offline

#2 2015-03-18 00:54:49

allencch
Member
Registered: 2011-03-25
Posts: 118

Re: Maintaining internet connection with Arch in Virtualbox

Do you use WM or DE in Arch Linux? Have you tried NetworkManager and network-manager-applet?

Offline

#3 2015-03-18 01:14:41

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Maintaining internet connection with Arch in Virtualbox

How is your guest arch connecting to internet?  If it is dhcpcd.service then what happens when you restart the service?  Not sure if suspend is called in guest arch when host is suspended.  If this is so, and restarting service reconnects, perhaps you can set it to automatically restart dhcpcd upon resume.

Offline

#4 2015-03-18 03:27:03

radu242
Member
Registered: 2009-03-15
Posts: 11

Re: Maintaining internet connection with Arch in Virtualbox

allencch: I use XFCE, without NetworkManager. I've tried installing it, and it does seem to work. However, I have internet now and I'm not convinced that disconnecting and reconnecting the interface through NM will do anything; I've tried running 'ifconfig down enp0s3' and 'ifconfig up enp0s3' when the connection broke and that didn't solve the issue. I feel like that's all NM will be doing, so it won't be of any use.

frank604: Restarting dhcpcd.service essentially does nothing when the connection is broken. I will open my laptop and within seconds Windows will connect and the VM Arch doesn't. Then, up to 5-10 minutes later, I keep restarting dhcpcd and the connection does not restore.

I'm thinking this could be an issue with Virtualbox on the host's end, but if it is I have no clue how to "kickstart" the network side of Virtualbox and restart it.

Offline

Board footer

Powered by FluxBB