VDE bits and pieces
VDE network consists of multiple tools:
- vde_switch - creates a virtual switch
- vde_plug, vde_plug2tap - for creating virtual cables
- dpipe - two-directional pipe, connects I/O streams of multiple programs
- vdeq, vdekvm (deprecated)
- Launching VDE switches
- vde_switch -F -s path/to/vde/socket
- Connect VDE switches
- use vde_plug, vde_plug2tap, dpipe to connect different vde_switches on the same and/or different machine
- Adding qemu machines to the VDE network
- add to qemu command: -net nic,macaddr='unique macaddr' -net vde,sock=path/to/vde/socket
- configure network on the guest
Recompiling qemu package for Ubuntu
Ubuntu repository (lucid) does not contain qemu with built in VDE support (discussion). That means that one has to compile qemu himself containing VDE support. Here's how I roughly did it based on this:
#get dependencies and tools for building (clean system probably needs more tools and libs)
apt-get source qemu-kvm
cd qemu-kvm*
sudo sudo apt-get build-dep qemu-kvm
sudo sudo apt-get install devscripts
sudo dch -l local 'qemu-kvm package with vde support'
#configure and build the sources into the package
./configure --enable-vde
debuild -us -uc
# install new packages
cd ..
sudo dpkg -i qemu_0.12.3+noroms-0ubuntu9.4local2_i386.deb
sudo dpkg -i qemu-kvm_0.12.3+noroms-0ubuntu9.4*.deb
sudo apt-get install qemu-common_0.12.3+noroms-0ubuntu9.4local2_all.deb
sudo aptitude install vgabios seabios
sudo dpkg -i qemu-common_0.12.3+noroms-0ubuntu9.4local2_all.deb
Links
- http://wiki.virtualsquare.org/wiki/index.php/VDE_Basic_Networking
- http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge
- Ready to use qemu images
Thank you very mach for this useful article :) In ubuntu 11.10 to build qemu-kvm with VDE support you also need this:
ReplyDeleteapt-get install libvdeplug2 libvdeplug2-dev