I have been wanting to see a VDE2 package for Fedora for a while now and so I took a little time to write a spec file for it. I have used it to build fc6 i386 (my platform) RPMS/SRPM. Not sure if the fedora-devel list is where I should submit these but I would like to contribute these to Fedora as I think in light of increased QEMU usage that this would be of interest to the general community and is a good candidate for having it included in Fedora directly. Gerry
#- VDE2 #- (ref: http://vde.sourceforge.net) #- VDE can be used to configure QEMU Guest access to the local HOST network: #- (ref: http://people.redhat.com/berrange/olpc/sdk/network-bridge.html) #- (ref: http://blog.bravecobra.com/index.php/linux?p=41&more=1&page=2) vde_switch -tap tun -daemon ifconfig tun 192.168.193.225 # (some free subnet & ip address) chmod 666 /tmp/vde.ctl # allow users control access #- Use ifconfig to verify whether the TUN device has the specified IP address: ifconfig #- TUN address acts as the GATEWAY for the QEMU Guest. #- Set TUN gateway to forward packets to eth0 (our LAN/Internet connection) #- To do this we use iptables: echo "1" > /proc/sys/net/ipv4/ip_forward # allow forwarding iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE vdeqemu -hda hd.img -boot c # EXAMPLE QEMU INVOCATION #- In QEMU configure networking to use another IP in the local subnet with a #- gateway corresponding to the TUN device IP: #- * IP: 192.168.193.226 (some free address in our new subnet) #- * subnetmask: 255.255.255.0 #- * gateway: 192.168.193.225 (HOST TUN device) #- * DNS: set it the same as your host OS
#run: rpmbuild -ba --define='packager Your Name' --define 'dist .fc6' vde2.spec Name: vde2 Version: 2.1.6 Release: 1%{?dist} Summary: Virtual Distributed Ethernet License: GPL Group: Networking/Other Url: http://vde.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/vde/%{name}-%{version}.tar.bz2 Source1: README.fedora BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(%{__id_u} -n) BuildRequires: autoconf automake libtool Obsoletes: vde <= 1.5.11 Provides: vde = %{version}-%{release} %description VDE is a virtual network that can be spawned over a set of physical computers over the Internet VDE connects together: (1) real GNU-linux boxes (tuntap) (2) virtual machines: UML-User Mode Linux, qemu, bochs, MPS. VDE can be used: (i) to create a general purpose tunnel (any protocol that runs over Ethernet can be put into the tunnel) (ii) to connect a set of virtual machines to the Internet with no need of free access of tuntap (iii) to support mobility: a VDE can stay interconnected despite of the change of virtual cables, i.e. the change of IP addresses and interface in the real world VDE2 includes: VLAN and Fast Spanning Tree Protocol management run time configuration interface: (a console for interactive use, a control terminal for daemons) wirefilter, a configurable tool able to introduce: delays, packet loss, linut bandwidth and several other filtering features %define libname lib%{name} %package -n %{libname} Summary: VDE libraries Group: Networking/Other %description -n %{libname} Library files for VDE %package -n %{libname}-devel Summary: VDE development libraries Group: Development/Other Requires: %libname = %version-%release %description -n %{libname}-devel Development files (headers, libraries) for libvde %prep %setup -q cp %SOURCE1 . %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/* %{_libexecdir}/vdetap %doc README README.fedora %{_mandir}/man1/*.1* %files -n %{libname} %defattr(-,root,root,-) %{_libdir}/libvde*.so.* %files -n %{libname}-devel %defattr(-,root,root,-) %{_includedir}/libvde*.h %{_libdir}/libvde*.so %{_libdir}/libvde*.*a %dir %{_libdir}/vde2 %{_libdir}/vde2/libvde*.so %{_libdir}/vde2/libvde*.*a %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %changelog * Tue Jun 05 2007 Gerry Reno <greno@xxxxxxxxxxx> - Release 1 - first Fedora package
-- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list