19_03_27_KVM - TuxML/ProjetIrma GitHub Wiki

KVM

Introduction

KVM (Kernel Virtual Machine) is a virtualization module in the Linux kernel that allows the kernel to function as a hypervisor.

During our procedure to boot a kernel compilation, we found this option in our tutorial and decided to have a look.

Problem

During the boot with QEMU, if we activate the option -enable-kvm in our command like this :

$ qemu-system-x86_64 \
  -kernel build/linux-x86-basic/arch/x86_64/boot/bzImage \
  -initrd build/initramfs-busybox-x86.cpio.gz \
  -nographic -append "console=ttyS0" \
  -enable-kvm

We optain an error for every compilation during the boot and it causes a bug which completly freeze our shell.

Result

Unfortunately we didn't found any solution. During our research, we found a command in the compilation

$ make O=$HOME/kdev/linux/build/linux-x86-basic kvmconfig

This command add specified option in the config file in order to enable the run of kvm in the boot
We try to boot with this command and it changes nothing, we always keep have the same error. We also try the boot without the 'kvmconfig' but nothing changes.

Conclusion

We decided to remove the option '-enable-kvm' and it works, well the boot didn't work everytime but it's not because of kvm. This option is not really useful in our project, we don't want to host a virtual machine in the boot. Our goal is only to check if we can boot or not.

⚠️ **GitHub.com Fallback** ⚠️