It's compiling...

I’m currently working at my university. My job is to explore the possibilities of the so-called “micro VMs” and if they can be used in the studi-cloud as well as in the research-cloud at my university.

I worked about 10 hours on this, and I’m trying to get OSv running. But at this moment, I’m stuck with compiling! First, I tried to compile OSv itself. It’s written in C++, which requires me to install the latest gcc on my Debian machine, I’m testing this stuff on. Ha-ha! Debian, you know, has gcc from-before-the-war installed. Well, not the 4.2 but still the 4.7.2, which is not modern enough to compile the sources of OSv. It always crashes with a compiler error.

But, no problem here! I just pulled the pre-build binaries from the site! Then I installed KVM and all required tools around it. I edited some configurations on the OSv part and tried to start a VM with it. But no, not yet! The problem is, that the Debian kernel has VHOST disabled. Whatever VHOSTs are, it is a Kernel feature. So, I pulled the linux kernel git tree, checked out the 3.2 kernel (which Debian currently is running on) and copied the configuration from /boot/config-amd64 to .config inside the kernel sources. I edited the configuration (by hand, you can also do this with make menuconfig) to enable CONFIG_VHOST_NET by setting it to y and started compiling it. After that, I realized that there is another way to compile a kernel for Debian! I installed fakeroot, kernel-package and linux-source-3.2 and started building the next kernel with this instructions. As I did all this via SSH on my testing machine, I’m not able to test if these kernels work. The grub entries are already there, but not installed yet. On monday, I will finish this setup and try these kernels. But, what I wanted to say initialy, it really sucks that all this stuff is not included in Debian. I mean, that there is not the newest gcc version, … I can understand this! It’s all about stability and so on. But I cannot understand why the kernel of a stable distribution, which is a good candidate for a server distribution, does not support features a virtual machine, namingly the Kernel Virtual Machine requires! This is really odd!

At least, the build process for a new kernel under Debian is straight-forward! You just have to copy the configuration of the kernel which is currently running, modifying the parts you want to change, and then build the kernel with the appropriate commands. After that, there is a .deb package, you can install with your package manager. This also includes a update for the bootloaded and, if the build process also built some modules, a package for the new modules is provided, too! Really neat!