Timing Issues With Junos Olive Under Linux Qemu/KVM

I’ve been fighting a bug with Junos Olive VMs running under KVM on a CentOS server for the last few days. I use Olive images now and then for network labs and to test configurations, and lately they’re not running very well at all on my Linux KVM server. Here’s a quick post on the problem and how to fix it.

It seems that at some point over the last few months a Linux kernel update has introduced a bug which affects OpenBSD systems running under KVM.

The symptoms with Junos Olive are:

  • Pings run erratically – sometimes one every 2-3 seconds, sometimes 20 to 30 seconds between pings
  • Routing protocols constantly losing their adjacencies and routes flapping
  • Errors in the messages log file complaining of time-related faults, like the ones below

It turns out that this is a bug in the Linux kernel running Qemu/KVM which affects OpenBSD guests, of which Junos Olive is based on.

To fix this, run the following command to add a parameter to the kvm_intel kernel module to disable the preemption timer:

… and reboot your server.

This will fix the problem, and you can go back to running your Olive images without all of your routing protocols flapping. According to the Linux developers, this fault will be fixed in an upcoming kernel release.

Permanent link to this article: https://crypt.gen.nz/2018/07/16/timing-issues-with-junos-olive-under-linux-qemu-kvm/