I can't ping my Ubuntu on VirtualBox (within another Ubuntu).
I had set my ip using:
# ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
but the ping still fails. What's different when you're in the VirtualBox?
sudo apt-get install uml-utilities bridge-utils
sudo modprobe tun
permission first :
sudo chmod +x vb
then to start :
sudo ./vb start
if we do not need it anymore
sudo ./vb stop
Here the Script :
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 [start|stop]"
exit 1
fi
#Check root
USER=$(id -u)
if [ "$USER" -ne "0" ]; then
echo "Must be root"
exit 1
fi
USER=your user
TAP=vth0
BR=br0
ETH=eth0
function doStart {
#Create the bridge
brctl addbr $BR
ifconfig $ETH 0.0.0.0 promisc
brctl addif $BR $ETH
dhclient $BR
tunctl -t $TAP -u $USER
brctl addif $BR $TAP
ifconfig $TAP up
echo "$TAP ready"
}
function doStop {
ifconfig $BR down
ifconfig $TAP down
tunctl -d $TAP
brctl delbr $BR
dhclient $ETH
echo "Cleaned"
}
case $1 in
start)
doStart
;;
stop)
doStop
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac
exit 0
Step :
I know that in vmware you have the option of bridging the connection from the hardware ethernet to the virtualized ethernet device. Are the connections bridged in VirtualBox?