ERIKA3 on the KVM hypervisor

From ERIKA WIKI
Jump to: navigation, search

Introduction

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). The following part of this tutorial will explain how to build and run ERIKA3 on top of the KVM hypervisor on the x86-64 platform.

Build ERIKA3 for KVM

Building ERIKA3 for Xen requires building an ERIKA3 image for bare-metal as described in the following tutorial: 'Building a bare-metal x86-64 image'.

With reference to the RT-Druid OIL configuration, set the the platform configuration parameters to generate the bare-metal image:

 PLATFORM = BARE

As for the interrupt controller configuration, KVM supports the APIC or X2APIC with the NO_TSC_DEADLINE mode (note that the X2APIC in the TSC_DEADLINE mode is not currently supported on KVM hypervisor). That is the possible OIL configuration are:

 INT_CONTROLLER = APIC

or

 INT_CONTROLLER = X2APIC { X2APIC_MODE = NO_TSC_DEADLINE; }

Run ERIKA3 on KVM

The path of the generated ERIKA3 bare-metal image (e.g., erika3.iso) has to be used to run the KVM.

The command to run the ERIKA3 on KVM is the following:

  kvm erika3.iso -cpu host -smp 1 -serial stdio -m 1G -no-reboot -no-shutdown

In order to pin ERIKA3 on a given CPU, use the Linux taskset command as follows;

  taskset -c $CPUID kvm erika3.iso -cpu host -smp 1 -serial stdio -m 1G -no-reboot -no-shutdown

where $CPUID is the identifier of the chosen CPU.