6
2
At work I use a VM running Linux Mint 13 under Oracle VM VirtualBox 4.2.16 on a Windows7 machine. The laptop is connected to a network cable and the wireless connection is turned off. The network setup for the VM is to use a Bridged Adapter to the Gigabit Network Connection with its own MAC Address. This allows me to run Samba on the Linux system so I can share files between the two operating systems. Everything works fine.
The problem happens when I take the laptop home. At home I use the wireless connection. The Windows side has no internet connectivity problems. The VM, on the other hand, runs really slow. Bringing up a xterm window and completing an 'ls' command might take 15 seconds. I've tried bringing up the VM with different adapter settings in VirtualBox and even with all Network Adapters disabled, but I see the same behavior every time.
When I'm patient enough (and an adapter is connected), I can see that the VM is getting an IP Address but it's unable to ping anything in the outside world. What could be happening here?
To further confuse things, I have a second VM running the same version of Linux Mint. Same VM hardware setup, it just doesn't have Samba running or any of my work. :) Anyway, it connects to the internet and runs just fine.
What could be different between the two that could cause one Linux VM to be so slow that it's unusable? I've tried stopping Samba, but that doesn't seem to change anything. What else could I try?
Update
Results of experiments tonight (Note: By "Xterm operations" I mean simple things like typing 'ls' in an Xterm window and navigating a directory structure):
- Tried running with no network connections enabled at all on the laptop (Windows or VM). Xterm operations were still slow.
- Enabled wireless network connection to the laptop. Enabled network connection to the VM, but did not attach it. Xterm operations were slow.
- Enabled NAT connection to the VM. The VM obtained a strange IP Address (10.0.3.15) and Xterm operations were still slow.
- Enabled bridged connection. Obtained correct IP Address (172.16.42.7, Windows was 172.16.42.4 and both had 255.255.255.0 for the mask), but Xterm operations were slow. Was able to ping 172.16.42.1 from the VM and ping the VM from Windows.
I should mention that I'm connecting to the Guest Network on my Apple Time Capsule.
At this point, I double checked the hardware configuration between my two VMs - the working one and the non-working one. I noticed 3D acceleration was enabled for the non-working one. When I disabled 3D acceleration, the Cinnamon windows manager displayed numerous graphical glitches, but Xterm operations were normal speed. I disabled 3D acceleration and rebooted into the software rendered version of Cinnamon.
The graphical glitches were gone and Xterm operations were normal speed. Unfortunately I could not connect externally. By that I mean I could ping 172.16.42.1, but not www.google.com. I would be okay switching to MATE, but that's difficult right now without an external connection.
Why would the window manager and/or 3D acceleration affect operations in an Xterm window when I'm running on a different network? Or could this be related to a different factor like the power supply? Something magical about my kitchen table?
Update 2
I switched Linux Mint 13 from running Cinnamon to running MATE and that solved the slowness problem!
Unfortunately I'm not out of the woods yet. This is probably a separate problem, but I can't connect to the outside world. The Linux Mint VM running MATE starts up and obtains an IP Address. I can ping the system from Windows. I can even mount the Linux Mint Samba share from Windows and browse the directories.
From the Linux Mint VM perspective, I can't ping the Windows host, but I can ssh into a Raspberry Pi on my network. So connectivity inside the network appears to work fine. I just can't ping Google from the Linux Mint VM. I even tried connecting via my wired network, but no luck there. I should probably write up a new question, but I wanted to at least post an update here on my latest status.
Verify that the emulated hardware in both VMs are identical. Try in Windows to un-check the “VirtualBox Bridged Networking Driver” setting in the “Wireless Network Connection Properties” dialog for the wireless card adapter. – harrymc – 2013-09-05T06:24:37.943
"when I'm patient... the VM is getting an IP Address ": what address? what is the network mask in your host (windows)? what kind of networking (bridged, nat?) Can windows ping the linux box? – Riccardo Zorn – 2013-09-05T19:03:53.543
@harrymc - The emulated hardware in both VMs is identical. If I un-check the "Bridged Networking Driver", that will break my Samba share because the VM will use the same IP Address as Windows. I don't really want to do that. – GrandAdmiral – 2013-09-06T11:00:42.800
@Riccardo Zorn - Basically it gets another address on the network. I'll confirm the numbers and try pinging the Linux box from Windows. – GrandAdmiral – 2013-09-06T11:04:34.570
Try switching off Windows Firewall (or maybe the VM's firewall (e.g. iptables)) to see if that is interfering with connectivity to the VM - sounds like it's managing to get an address via DHCP and then being blocked. The UI on VM is likely be slow if it think it's got an interface up as it tries to DNS lookups for X desktop services is timing out. – Pierz – 2013-09-06T15:43:39.923
I'll just reiterate that I can bring up the VM with all network connections disabled and I still see the same slowness problem. Does that make sense with any of the proposed fixes? – GrandAdmiral – 2013-09-06T18:43:52.110