IP over IP tunnel setup on Debian Lenny »

    qemu windows guest with audio over network using pulseaudio

    2010-02-08

    Permalink 01:39:06, by phaoost Email , 248 words   English (EU)
    Categories: notes

    qemu windows guest with audio over network using pulseaudio

    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 :)

    Trackback address for this post

    This is a captcha-picture. It is used to prevent mass-access by robots.
    Please enter the characters from the image above. (case insensitive)

    1 comment

    Comment from: Andy Fillen [Visitor] · http://www.google.com
    thanks
    2010-03-17 @ 12:31

    Leave a comment


    Your email address will not be revealed on this site.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)
    This is a captcha-picture. It is used to prevent mass-access by robots.
    Please enter the characters from the image above. (case insensitive)

    You can just use your OpenID to provide your name, e-mail and url.

    September 2010
    Mon Tue Wed Thu Fri Sat Sun
     << <   > >>
        1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30      

    Search

    Categories

    XML Feeds

    blogtool