Does anyone know how to setup using VirtualBox a network strictly between the VMs and the host? Here is what I have using VMware, and would like to recreate using VirtualBox:
My computer has 2 physical interfaces: eth0 and eth1. The first interface is attached to a land-line nic. The second interface is attached to a wireless nic.
When I installed VMWare, it created two additional network interfaces: vmnet1 and vmnet8. I rarely use vmnet8, but this interface bridges to the internet (what Virtualbox incorrectly calls host networking). The other interface vmnet1 only exists in the memory of my laptop. It provides dhcp to assign addresses, and does not route to the internet. The vmnet1 interface on the host has an IP address on the same network as the virtual machines using the host only network. This allows the virutal machines to see and interact with the host and other VMs, but not to the internet as a whole (except for software update, but that is done by installing apt-cacher on the host, so the VM does not see the internet, it sees the proxy).
How can I create the same setup in VirtualBox?
VMWare style host only networking
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
-
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
kilou:
Well, theoretically you can bridge to Wireless, like this:
tunctl -t tap0 -u tux
ifconfig tap0 0.0.0.0 up
brctl addbr br0
brctl addif br0 ra0 tap0
dhcpcd br0
ifconfig ra0 0.0.0.0
ra0 is your WiFi connection.
Look at my VirtualBox guide:
http://forgeftp.novell.com/lfl/.html/virtualbox.html
See chapter: "Intermediate Topic: Networking via Host Bridging"
Well, theoretically you can bridge to Wireless, like this:
tunctl -t tap0 -u tux
ifconfig tap0 0.0.0.0 up
brctl addbr br0
brctl addif br0 ra0 tap0
dhcpcd br0
ifconfig ra0 0.0.0.0
ra0 is your WiFi connection.
Look at my VirtualBox guide:
http://forgeftp.novell.com/lfl/.html/virtualbox.html
See chapter: "Intermediate Topic: Networking via Host Bridging"
VMWare style host only networking
PERFECT!Technologov wrote:Unfortunately there is no GUI way to do that.
This is just what I was looking for. Now at the risk of starting a flame war...
I can think of several ways of automating this. In my most demanding situation, I have machines that I need to have running right from startup (even before login if possible). I have seen some postings on editing the inittab directly, which is not a good idea for so many reasons. The other way that makes sense to me to to provide a init.d startup script.
Does anyone know if there is a preferred way to start up one or more VMs automatically on startup?
Thx
I've tried that (replaced ra0 with eth1 since my wireless is eth1) but I have no connection in the guest I'm looking for a way to setup networking so that I always have network between host and guest, wired internet access when eth0 is connected and wireless internet access when eth1 is connected. Is this possible to do?Technologov wrote:kilou:
Well, theoretically you can bridge to Wireless, like this:
tunctl -t tap0 -u tux
ifconfig tap0 0.0.0.0 up
brctl addbr br0
brctl addif br0 ra0 tap0
dhcpcd br0
ifconfig ra0 0.0.0.0
ra0 is your WiFi connection.
Look at my VirtualBox guide:
http://forgeftp.novell.com/lfl/.html/virtualbox.html
See chapter: "Intermediate Topic: Networking via Host Bridging"
Many wireless cards do not support bridging. You might want to set up routing between the host interface and the wireless card (see http://virtualbox.org/wiki/Advanced_Networking_Linux in the user-contributed HOWTOs section of http://virtualbox.org). Or you might want to consider whether you really need host networking (if you just want a couple of servers on the virtual machine to be accessible from the network you can set up port forwarding to the guest).