| IP over IP tunnel setup on Debian Lenny » |
Recently I had to install Windows XP to run under qemu on Debian to be able to run some chat program which cannot be run in Linux/Wine. I used to work from laptop, however I have a workstation so I decided to run qemu on it to minimize CPU load on a laptop. However, I needed to make sound to work on the network so I could hear chat alerts on the laptop.
Herebelow is what I did.
On the workstation:
Created /home/phaoost/bin/winxp.sh:
#!/bin/sh
export QEMU_AUDIO_DRV=pa
export QEMU_PA_SAMPLES=512 # Experimental values
export QEMU_PA_DIVISOR=0 # on which I got the sound with no jitter
ARGS="-usb -usbdevice tablet -usbdevice host:auto:*.* -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=/etc/qemu-ifup -m 1024 -localtime -hdc /dev/sda -soundhw sb16 /var/pub/winxp.dsk"
/usr/sbin/tunctl -u phaoost -t tap0
echo "Starting QEMU with..."
echo $ARGS
echo "...."
exec kvm $ARGS
Added to /etc/sudoers:
Cmnd_Alias QEMU=/sbin/ifconfig, \
/sbin/modprobe, \
/usr/sbin/brctl
phaoost ALL=NOPASSWD: QEMU
Created /etc/qemu-ifup:
#!/bin/sh
echo "Executing /etc/qemu-ifup"
echo "Bringing up $1 for bridged mode..."
sudo /sbin/ifconfig $1 0.0.0.0 promisc up
echo "Adding $1 to br0..."
sudo /usr/sbin/brctl addif br0 $1
sleep 2
Added to /etc/pulse/client.conf:
default-server = tcp:172.16.17.3:4713 # Laptop IP
Adjusted /etc/network/interfaces with following:
auto br0
iface br0 inet static
address 172.16.17.7
netmask 255.255.255.224
gateway 172.16.17.30
bridge_ports eth1
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
#allow-hotplug eth1
iface eth1 inet manual
On the laptop:
In /etc/pulse/default.pa added the following line:
load-module module-native-protocol-tcp auth-ip-acl=172.16.17.0/27 # My LAN
After that I could capture all windows sounds on a laptop.
Pretty easy, however it took me hours of research to make it work ![]()