VirtualBox networking does not work with Host Interface
I've installed Ubuntu Hardy Heron 8.04 on my laptop, which uses a wireless network, and then installed VirtualBox. I want to set up a virtual machine for development, etc etc. So I set up CentOS 5.1. Installation went fine, but upon booting, it gives the error when trying to start the network:
Bringing up interface eth0: Error, some other host already uses address 192.168.1.99
Let me tell you how I created the networking for this machine. I followed the instructions given at https://help.ubuntu.com/community/VirtualBox to set up parprouted as per the "Wireless Networking" instructions:
This creates a network device called tap0, which I can ping from my laptop, etc etc. Then in the VirtualBox network settings, I selected Host Interface and typed in tap0.
I read around on some of the forums and in Google, and found http://www.linuxquestions.org/questi...xxxxxx-554768/ and http://www.linuxquestions.org/questi...xx.xxx-187162/ which seem to be addressing similar-but-different issues, and didn't give me any hints.
Anyway, I thought OK, what might be happening. I'm pretty much a networking novice. But I did an arping from within the virtual machine, to check whether the IP address was already in use:
Hmmm. OK, so what if I try to set the device up manually? My wireless router is 192.168.1.1.
I read a little more about all this, and added the following line to my network start script as suggested here http://home.nyc.rr.com/computertaiju...oxbridge.html:
Looks like for whatever reason, the little parprouted sleight-of-hand isn't working for this virtual machine the way it ought to be. Any ideas? Remember I don't know much about networking, so if you have any suggestions for me I would appreciate if you can help me understand all the steps I'll have to take.
I would suggest you download the pdf documentation off www.virtualbox.org
it goes into a number of scenarios including bridge
2) but why not think virtual?
pretend your vm is called centos
click on settings click on network
add a network card....its virtual intelpro is the easy one
what you get on boot up of the vm...is a virtual ethernet card that your host thinks is a real card so you can talk between the 2 machines host to vm
3) I have done something very similar on a diffent distro vm to get net access....it saves mucking about adding bridge tools etc
don't know, how to get your attempt finally working, but here is the way, I painlessly got my vbox working fine. But first: If you did not find until now, there is a nice manual for VirtualBox: get it here.
I'm writing out of my memory, so please excuse, if I miss a command parameter. Everything should be verifyable with the manual.
What I did was:
1) setting up a virtual bridge,
2) plugging my physical network adapter into this bridge
3) creating a virtual adapter for my vmachine and plug it into the bridge
4) making everything persistent
You need to have installed (synaptic or apt-get): bridge-utils
1) as root, run on console: brctl addbr br0
2) as root, run on console: brctl addif eth0
3) as root, run on console: VBoxAddIF vbox0 <user_name> br0
4) edit /etc/network/interfaces as follows:
leave your physical adapter (e.g. eth0) as it is! For your bridge, add:
- It is said, that you don't have to set an owning usr in step 3), but a group - as vboxusers. This did not work here. I did not spent much time to discover why.
- I am not 100% sure, but I strongly believe, that it is enough to do steps 3) and 4). If I am right, steps 1) and 2) are needed to get virtual networking up and running on a running systen. If booting up your host machint, step 4) makes your system to set up a new bridge and to plug the physical device into the bridge. As said, I am not 100% sure.
|All times are GMT -5. The time now is 09:33 PM.|