Archive

Archive for March, 2009

VirtualBox – ubuntu host vista guest Host Interface Networking via Wireless

March 25th, 2009

Wireless Networking

Setting up a normal bridged network generally doesn’t work if you’re bridging from a wireless card to VirtualBox. A simple script that utilises the parprouted tool will allow your VM full access to the wireless network.

You will require parprouted to do this:

sudo apt-get install parprouted

Next, using your favorite text editor, create and edit the script, for example:

sudo nano /etc/network/if-up.d/vbox_network

Then, enter the script replacing $USER with your username or whoever you intend to run virtualbox as. Replace wlan0 with the name of your wireless interface. Use an available IP address on your network for tap0 I have used 192.168.1.100 in this case:

sysctl net.ipv4.ip_forward=1
VBoxTunctl -b -u $USER
ip link set tap0 up
ip addr add 192.168.1.100/24 dev tap0
parprouted wlan0 tap0

Finally, make sure the new file is executable by root:

sudo chmod 700 /etc/network/if-up.d/vbox_network

Now your networking script is installed, the virtual interface tap0 will be available on boot for VirtualBox. Rather than reboot, let’s just run the script now:

sudo /etc/network/if-up.d/vbox_network

The final thing to do is tell VirtualBox to use the new virtual device tap0. Open VirtualBox, highlight a VM and click settings. Now choose the network option and select Host Interface on the ‘attached to’ drop down menu. In the Interface Name text box, enter: tap0

Click ok and start your VM. The VM should now behave as though it was another physical machine on your network

For more information on the process up to this point, please visit Bridged Networking with VirtualBox on Linux Hosts

Using DHCP in the Guest VM

It was possible to get DHCP to work on the guest virtual machine. Instructions were taken from here. Because parprouted does not relay multicast, we need to use an additional helper daemon to manage this. I tried dhcp-helper and bcrelay, and had the most success with bcrelay.

Use it as follows:

sudo apt-get install bcrelay
sudo bcrelay -i tap0 -o wlan0

At this point, my /etc/network/if-up.d/vbox_network is as follows:

#/bin/sh
sysctl net.ipv4.ip_forward=1
VBoxTunctl -b -u jacob
ip link set tap0 up
ip addr add 192.168.1.200/32 dev tap0
parprouted tap0 wlan0
route add -net 192.168.1.0 netmask 255.255.255.0 tap0
bcrelay -i tap0 -o wlan0

via VirtualBox – Community Ubuntu Documentation.

Author: lhe Categories: Leiv Hendrickx, Linux (Ubuntu) Tags:

How To Share Files In VirtualBox With Vista Guest And Ubuntu Host – Make Tech Easier

March 21st, 2009

This article describes perfectly how to create a shared folder between a Virtualbox on an Ubuntu host with a Windows guest.

The article shows how to do it with Vista, but the same way of working is valid for an XP guest.

Just make sure to check the sharing options you have set on your Ubuntu machine for the folder you are trying to share! Make sure that sharing is turned on and that everyone has access to the folder.

How To Share Files In VirtualBox With Vista Guest And Ubuntu Host – Make Tech Easier.

Headphone fix for Ubuntu 8.04 and 9.10 on Sony Vaio

March 18th, 2009

I was looking for the way to get my headphones working on my Sony Vaio VGN-FZ29VN with Ubuntu 8.10 and this is what i found (ow yeah don’t forget about sudo when you try this!!):

The Problem : The headphone / earphone jack is being ignored by Ubuntu 8.04 ’Hardy Heron’ on the Sony Vaio VGN-FZ21S. Sound continues to play exclusively through the lap-top speakers whether or not headphones or earphones are plugged in.

The Solution :

Edit the file :

/etc/modprobe.d/alsa-base

To include this line at the end :

options snd-hda-intel model=vaio

Save the file and reboot your machine.

via Michael Flanagan » Headphone fix for Ubuntu 8.04 on Sony Vaio.

UPDATE FOR UBUNTU 9.10 :
the file is called /etc/modprobe.d/alsa-base.conf on Ubuntu Jaunty

Author: lhe Categories: Leiv Hendrickx, Linux (Ubuntu) Tags: ,