Having recently set up OpenVZ on Xen, I wanted to create a Debian 7 VPS for a friend. Unfortunately, after creation, the VPS would not start. I kept receiving the following error message:

FATAL: kernel too old

This is actually an error message from the VPS, not the OpenVZ node level. In short, the new Debian 7 VPS was expecting a kernel newer than 2.6.18 (the OpenVZ node level version). Remember: OpenVZ VPS’s don’t have their own kernel, they run on the OpenVZ node level kernel, but you can replace the version that is available 😉

Thanks to Nallappan TK at Linux by TK Nalla for the original post.

We need to replace the kernel version in ‘/proc/sys/kernel/virt_osrelease’ on the OpenVZ node level.

# cd /proc/sys/kernel/

# cat virt_osrelease
2.6.18-348.4.1.el5.028stab107.2xen

# echo 2.6.32 > virt_osrelease

Thats it! You should now be able to start the VPS. Generally speaking, you should be able to increase the kernel version to whatever version a VPS is expecting, whenever you get that error message. Now, how to find out what kernel version a VPS OS is expecting…

Update 14-09-2013: I received a tweet from _openvz_ earlier this week indicating you can set the expected kernel version for each OS template in the /etc/vz/osrelease.conf file. As per the above, I was trying to start a Debian 7 based VPS. My /etc/vz/osrelease.conf file did not contain an entry for Debian 7. I proceeded to revert the above change to the /proc/sys/kernel/virt_osrelease file and added an entry to the /etc/vz/osrelease.conf file instead:

# cd /proc/sys/kernel/

# cat virt_osrelease
2.6.32

echo 2.6.18-348.4.1.el5.028stab107.2xen > virt_osrelease

# cat virt_osrelease
2.6.18-348.4.1.el5.028stab107.2xen

# cd /etc/vz

# vi osrelease.conf

[press the insert button]

(I added the following line to the end)

debian-7.0      2.6.32

[press the escape button]

(type a colon)

(type: wq)

:wq

[Press the enter button]

I then created a new Debian 7.0 VPS that deployed and started successfully!

Leave a Reply

Post Navigation