On Monday 22 September 2008 13:41:38 Clifford W. Hansen wrote: > On Friday 19 September 2008 09:56:11 Clifford W. Hansen wrote: > > On Friday 19 September 2008 09:38:04 Stephan Peijnik wrote: > > > On Fri, 2008-09-19 at 08:59 +0200, Clifford W. Hansen wrote: > > > > I would like to find out from the list what they use on there laptops > > > > for virtulization. > > > > > > > > I'm needing to run a vm on my laptop for using as a development > > > > server, and I need it to be able to access the network my wifi card > > > > is attached to. > > > > > > > > I have scoured the interweb and havn't found what I'm looking for > > > > (other then vmware which has some issues) > > > > > > > > I would prefer to run the latest etch-n-half kernel, possibly even > > > > lenny although I don't have lenny yet. > > > > > > Personally I am using VirtualBox OSE for exact the reason you would > > > like virtualization. > > > > > > After a quick check virtualbox-ose is either available within Lenny > > > (including the kernel module) or via etch-backports where you need to > > > build the kernel module yourself though. > > > > > > For a list of packages available in Debian check > > > http://packages.debian.org/search?keywords=virtualbox-ose. > > > > > > Regards, > > > > > > Stephan > > > > Stephan, > > > > I was using VirtualBox for a while, but could never get the bridged mode > > working due to my laptop connecting via wifi, but then again no one else > > needs to access my dev box anymore. Well DHCP wasn't working. > > > > Will give it a bash again, thank you... > > Just for future reference / anyone who is interested I got the following > working. > > And it almost does exactly what I need, well it's good enough for now: > <vbox-networking.sh> > #!/bin/bash > > LAN="eth1" > DHCP_SERVER="xxx.xxx.xxx.xxx" > > case "${1}" in > "start" ) > TAP=$(VBoxTunctl -b -u clifford) > echo ${TAP} > /var/run/vbox.tap > sysctl net.ipv4.ip_forward=1 >> /dev/null > ip link set ${TAP} up > ip addr add xxx.xxx.xxx.xxx/xx dev ${TAP} > parprouted ${LAN} ${TAP} > iptables -t nat -A POSTROUTING -o ${LAN} -j MASQUERADE > dhcrelay3 -q -i ${LAN} -i ${TAP} ${DHCP_SERVER} > echo ${TAP} > ;; > "stop" ) > TAP=${3} > kill -9 $(ps -elf | grep ${TAP} | grep -v grep | awk > '{print $4}' | grep -v $$) > ifconfig ${TAP} down > VBoxTunctl -d ${TAP} >> /dev/null > sysctl net.ipv4.ip_forward=0 >> /dev/null > ;; > esac > </vbox-networking.sh> > > This can then be used by VirtualBox as the network script (Network --> Host > interface settings --> Setup/Terminate) > > I just run these as "sudo /path/to/vbox-networking.sh start" and it does > the rest. > > Unfortunately due to using parprouted it seems like it's not accessable > from the lan, but I'm working on this... The solutions possibly has > something to do with a bridge...
I thought about replying to you when you first posted, but I didn't know how to respond to bridging over wifi. The debian wiki has some pretty good info on setting up a bridge for virtualbox. A few weeks ago, I updated the example script that brings the interface up and down, and added a snippet of my sudoers file that lets you run the particular commands without using a password. On my system, all the tap interfaces are named vbox_{$vboxname}, and everything seems to be working just fine. Here's the page: http://wiki.debian.org/VirtualBox I didn't like adding the tap interfaces to /etc/vbox/interfaces, and I think that the solution on the wiki page is much better than having to list static interfaces there. Btw, I've never heard of parprouted before. I just looked up the package and it seems interesting. I might play with this later. Using an ethernet bridge can be painful on a laptop sometimes, like when there's no dhcp server on the network, and you have to give the br0 a static address. That makes it much more difficult when the VM's are also expecting to get their network info from dhcp. There are also problems when there is a dhcp server, but there's no dns updates for the hostnames. This can get to be annoying when you're using many VM's. -- Thanks: Joseph Rawson
signature.asc
Description: This is a digitally signed message part.