You are using VirtualBox on Debian 5.0, and you are running the original Debian packages. You want to connect your virtual machines to the host LAN (bridged mode). In the graphical interface you will find the options ʻName of the interface’, ʻProgram to set up’ and ʻProgram to remove’, but you cannot do anything with them.
1. Setting up Ethernet Bridge
In order for your guests to be passed through to your LAN, you first need an Ethernet-Bridge. We will assume here that this is called
2. Setting up network cards for VirtualBox
Under Debian, the configuration file interfaces is located in
/etc/vbox. There you have to configure a network card for each virtual machine that will be connected to the LAN. Each network card is assigned to a user – here in the example
mk. This is necessary so that VirtualBox can also be used as non-root. The network cards should be named
vbox0 mk br0 vbox1 mk br0 vbox2 mk br0
In the above example, the three network cards
vbox2 are assigned to the user
mk and attached to the bridge br0.
After this change the start script
/etc/init.d/virtualbox-ose ensures that the network cards will be set up (a reboot would also work):
root@linux# /etc/init.d/virtualbox-ose Shutting down VirtualBox host networking...done. Starting VirtualBox host networking...done.
3. Configuring VirtualBox
After these two steps, you can assign a guest, e.g. the
vbox0 card (under Name of the Interface) in the VirtualBox graphical user interface. Under Connected to, select Hostinterface. The Program to set up and Program to remove fields may remain empty.
After the virtual machine starts, it will have a network card connected to the LAN. This card can, for example, obtain an IP address from the normal DHCP server in the LAN via a DHCP request (not from VirtualBox!).