-
-
Notifications
You must be signed in to change notification settings - Fork 604
Building OSv on Debian stable
Hiroshi Hatake edited this page Jun 10, 2015
·
4 revisions
- Install binary packages.
ant/maven needs to be installed after installing JDK7, otherwise apt will install older JDK.
sudo apt-get update
sudo apt-get install build-essential libboost-all-dev autoconf libtool openjdk-7-jdk python-dpkt tcpdump autogen pkg-config libglib2.0-dev libncurses-dev git curl
sudo apt-get install ant maven libmaven-shade-plugin-java
- Enable kernel modules.
sudo vi /etc/modules
Add following lines on the end of the file:
kvm_intel
vhost-net
- Add bridge for OSv instance.
sudo vi /etc/network/interfaces
Delete eth0 lines, then add following lines on the end of the file:
auto br0
iface br0 inet dhcp
bridge_ports eth0
(This is for DHCP configuration on eth0, the configuration would be different if you are using static IP or another interface)
- Reboot the machine
sudo reboot
- Install gcc-4.8.3 from source.
wget ftp://ftp.jaist.ac.jp/pub/GNU/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2
tar -xvpf gcc-4.8.3.tar.bz2
cd gcc-4.8.3/
./contrib/download_prerequisites
mkdir build
cd build
../configure --disable-multilib --program-suffix=-4.8.3 --enable-stage1-languages=c,c++ --enable-languages=c,c++ --disable-isl-version-check
make
sudo make install
- Install qemu-2.0.2 from source.
wget http://wiki.qemu-project.org/download/qemu-2.0.2.tar.bz2
tar -xvpf qemu-2.0.2.tar.bz2
cd qemu-2.0.2/
./configure --target-list=x86_64-softmmu
make
sudo make install
- Install gdb-7.8 from source.
wget http://ftp.gnu.org/gnu/gdb/gdb-7.8.tar.gz
tar -xvjpf gdb-7.8.tar.bz2
cd gdb-7.8/
mkdir build
cd build
../configure
make
sudo make install
- Checkout OSv from github
git clone https://github.com/cloudius-systems/osv.git
cd osv
git submodule update --init --recursive
- Build OSv with gcc-4.8.3
make CC=gcc-4.8.3 CXX=g++-4.8.3
- Run OSv with br0
'-n' option does not work on Debian stable since it doesn't have /usr/libexec/qemu-br idge-helper. '-nv' (vhost-net) works, but even if you install libvirtd, it never going to configure virbr0. Therefore we will use manually defined bridge(br0) and use it from vhost-net('-nv'). Note that vhost-net requires root privilege.
sudo ./scripts/run.py -nv -b br0