host-kernel_mit_aktiviertem_vhost_net_um_das_gastnetzwerk_zu_beschleunigen
Host-Kernel mit aktiviertem vhost_net um das Gastnetzwerk zu beschleunigen
Das hier ist nur mit Ubuntu 10.04 nötig, ab Ubuntu 10.10 wird der Kernel diese Option schon haben.
#!/bin/bash
cd /usr/src || exit
export PROXY="10.10.5.80:3128"
export HTTP_PROXY="http://${PROXY}"
export HTTPS_PROXY="http://${PROXY}"
mv -fv vhost vhost_kernel ubuntu-package
cp -a /usr/share/kernel-package ubuntu-package
# Das Quell-Verzeichniss "linux-2.6.32" muss natürlich da sein!
cp linux-2.6.32/debian/control-scripts/{postinst,postrm,preinst,prerm} ubuntu-package/pkg/image/
cp linux-2.6.32/debian/control-scripts/headers-postinst ubuntu-package/pkg/headers/
aptitude update && aptitude -y safe-upgrade
apt-get build-dep --no-install-recommends linux-meta
git clone https://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu-kvm.git vhost
cd vhost || exit
./configure --prefix=/usr/local && make && make install
cd ..
STABLE="$(links -http-proxy ${PROXY} -dump "http://kernel.org/pub/scm/linux/kernel/git/stable/?C=M;O=D" | fgrep 'linux-2.6.' | head -n1 | awk '{print $1}')"
#git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6-stable.git vhost_kernel
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/${STABLE} vhost_kernel
cd vhost_kernel || exit
make clean
cp $(ls -1 /boot/config-*-server | tail -n1) .config
yes '' | make oldconfig
sed -i 's/.*CONFIG_VHOST_NET.*/CONFIG_VHOST_NET=y/' .config
make-kpkg clean
cd ..
cd vhost_kernel
CONCURRENCY_LEVEL=$(getconf _NPROCESSORS_ONLN) fakeroot make-kpkg --initrd --append-to-version=-vhost --overlay-dir=/usr/src/ubuntu-package kernel_image kernel_headers
awk '{print "dpkg -i",$1}' debian/files
echo "
reboot
"
weitere Infos:
/home/http/wiki/data/pages/host-kernel_mit_aktiviertem_vhost_net_um_das_gastnetzwerk_zu_beschleunigen.txt · Zuletzt geändert: von 127.0.0.1
