Network with VirtualBox

Discussion in 'General' started by jemrpo, Dec 24, 2008.

  1. jemrpo

    Joined:
    Dec 24, 2008
    Messages:
    4
    Likes Received:
    0
    I'm running 2.6.27 Gentoo Linux, I installed virtualbox because I want to do some testing with Elastix, it boots ok but when it comes to networking I can't get Elastix ping any adress neither internet or my "real" machine, I've red there's something you must set to get that your virtual machine communicate with your "real" machine, so can anyone tell me where's the how to that tells how to make it run?.
     
  2. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    ok... It's not easy! :huh:
    Because VBox don't work like VMWare (bridge mode).
    VBox work in NAT mode (basically).
    You must declare a virtual device into VBox and join this virutal device to ethernet device from your computer (Something like that).

    Personally, I don't make a good success with VBox :blush:
    Yet, Vbox is more fast that VMWare. :(

    If somebody know how make a good configuration eth with VBox.... ;)
     
  3. jemrpo

    Joined:
    Dec 24, 2008
    Messages:
    4
    Likes Received:
    0
    I've been doing some research and everything i found is for ubuntu, and I've bee trying and have no success.
     
  4. jhamon

    Joined:
    Jun 30, 2007
    Messages:
    11
    Likes Received:
    0
    Hi,

    I used the latest version of virtualbox 2.1.0 which came out a few days ago and had no problems in getting this to work.

    I selected host interface under the network connection and it worked first time.




    Jonathan Hamon
     
  5. jemrpo

    Joined:
    Dec 24, 2008
    Messages:
    4
    Likes Received:
    0
    Can your explain how did you get this to work?,
     
  6. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    hi Jonathan.

    For exemple: If you select a "host interface" for a Wifi device, you lost your network connexion. So, until vbox work, you lost ethernet connection from your pc, for using it into the Vbox. And if you stop Vbox, your ethernet connection become up.
     
  7. jhamon

    Joined:
    Jun 30, 2007
    Messages:
    11
    Likes Received:
    0
    Hi,

    I'm using the wifi host adapter and this works on both the host machine and the virtual machine.

    Sorry but I don't really follow the problem you are having.



    Jonathan Hamon
     
  8. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    Yes, it's work with the last Vbox version.(2.1.0)
    Just choice the "host network adaptor" and selected from the device list.

    Cool!! ;)
     
  9. jemrpo

    Joined:
    Dec 24, 2008
    Messages:
    4
    Likes Received:
    0
    Under windows or linux host?
     
  10. jhamon

    Joined:
    Jun 30, 2007
    Messages:
    11
    Likes Received:
    0
    Hi,

    I'm using this on a Windows host and have found that with version 2.1.0 of virtual box it works with either NAT mode or as previously posted with host interface.




    Jonathan Hamon
     
  11. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    I'm using this on a Windows host. :huh:
     
  12. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    I use virtualbox with ubuntu and debian without problem You need to install the package bridge-utils.

    First you need to make your ethernet card work on promisc mode, then create a bridge and then add your ethernet card to that bridge. I use this in an script:

    Code:
    ifconfig eth0 0.0.0.0 promisc
    brctl addbr br0
    brctl addif br0 eth0
    dhclient br0
    
    as you see I assign a dynamic address to br0 that would be for the host ip configuration. Instead of using etho I would now use br0 as my ethernet interfase. Then I would have to create a tap interfase

    First you would need to create a virtual interface and that you can do it with a virtual box utility
    Code:
    VBoxAddIF vbox1 rafael br0
    
    Here I created a tap interface own by user rafael to the bridge br0. After this please configure Virtualbox to use host network and for the name of the interfase put vbox1. I would recommend you to read this doc that would be usefull for any version of linux.
     

Share This Page