Virtual machine cannot be connected

Discussions related to using VirtualBox on Linux hosts.
Post Reply
mithras
Posts: 5
Joined: 27. Sep 2008, 15:39

Virtual machine cannot be connected

Post by mithras »

I have a Kubuntu Intrepid installation with Virtualbox 2.0.2 OSE installed. I created a vm with Ubuntu server.

I set up a bridge in /etc/network/interfaces, restarted the network and added the vbox0 interface. Because I have a laptop with almost every time a wlan0 up, the bridge is connected to wlan0. In the settings of the vm I set up a network interface connected to vbox0.

Output of ifconfig -a of my host system gives:

Code: Select all

jurian@karolina:~$ ifconfig -a
br0       Link encap:Ethernet  HWaddr 00:21:5c:51:8d:e1  
          inet addr:192.168.1.72  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::221:5cff:fe51:8de1/64 Scope:Link             
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1             
          RX packets:1528 errors:0 dropped:0 overruns:0 frame:0          
          TX packets:1316 errors:0 dropped:0 overruns:0 carrier:0        
          collisions:0 txqueuelen:0                                      
          RX bytes:1141257 (1.1 MB)  TX bytes:283861 (283.8 KB)          

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host     
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:184 errors:0 dropped:0 overruns:0 frame:0
          TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0                             
          RX bytes:12088 (12.0 KB)  TX bytes:12088 (12.0 KB)    

vbox0     Link encap:Ethernet  HWaddr 00:ff:3e:cf:0f:a6  
          inet6 addr: fe80::2ff:3eff:fecf:fa6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:25 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:2862 (2.8 KB)  TX bytes:2134 (2.1 KB)

wlan0     Link encap:Ethernet  HWaddr 00:21:5c:51:8d:e1
          inet6 addr: fe80::221:5cff:fe51:8de1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8745 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6578 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9338891 (9.3 MB)  TX bytes:1105120 (1.1 MB)

wmaster0  Link encap:UNSPEC  HWaddr 00-21-5C-51-8D-E1-64-65-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Typing 192.168.1.72 into Firefox gives a Page Load Error.

How can I connect from my host to my server? I'm quite a noob in virtual machines and networking, but I followed the manual as good as possible.

Did I do something wrong or did I forget something? Thanks for any help :)
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

See the VirtualBox FAQ. Wifi + bridge won't work. Limitation of Bridge-utils.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mithras
Posts: 5
Joined: 27. Sep 2008, 15:39

Post by mithras »

Do you mean it is because of the bridge failure impossible to connect to the virtual machine if you own a laptop, or is it possible but not with bridging?

I have looked at FAQ, but it says nothing how to do it without bridging. Is there a workaround?
/edit. Ok, sorry for the quick reply. I found after some searching a guide to set it up. I have not tested it yet, but http://www.savvyadmin.com/virtualbox-wi ... with-dhcp/ seems to explain in detail how to get it to work.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Yeah, that is a 'work-around' using parprouted. We didn't mention that specifically, because it involves some advanced setup and even I don't have experience with that. Why would be include something, if you can't properly support it, or can have major issues setting it up?

Good luck.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mithras
Posts: 5
Joined: 27. Sep 2008, 15:39

Post by mithras »

Ok, the solution worked. Maybe it's a good idea to mention it in the FAQ though. Ubuntu does it at their wiki: https://help.ubuntu.com/community/VirtualBox.
But thanks for your help. Is it ok I ask another one? ;)

I have now connection to my virtual machine, e.g. i can enter the ip address of my vm and get the default apache page. My vm has unfortunately no internet connection. I have enabled a second network adapter with NAT, but that doesn't work. Is there a solution?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

If you can access your network using the parprouted method, and the whole network can access your VM, I don't see why it wouldn't work. You have to have the correct settings for DNS and Gateway for it to work ;).

Setting up NAT should not give you any problems, though. And what doesn't work? You can't access http://www.google.com? Can you access http://66.249.91.147? If you can access the latter but not the first, your primary DNS of the Host doesn't work.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply