简体   繁体   中英

How to enable KVM on Nvidia Jetson Nano / How to build kernel with KVM support?

I am trying to run firecracker , a KVM virtualization tool, on my Nvidia Jetson Nano. However, it fails on the creation of the KVM device. It turns out there's no /dev/kvm , so I guess the kernel wasn't compiled with KVM support, or there should be an option somewhere to enable KVM.

I'm running the official ubuntu image provided by them.

I found the kernel + config file here: https://github.com/OE4T/linux-tegra-4.9/blob/oe4t-patches-l4t-r32.4/arch/arm64/configs/tegra_defconfig but I need to know which configurations I need to add to enable KVM support and also if adding these configurations is enough to get KVM running.

I recently made a tutorial on this: https://github.com/lattice0/jetson_nano_kvm

But basically, you need to add your configurations

CONFIG_KVM=y
CONFIG_VHOST_NET=m

CONFIG_VHOST_NET is not needed but you'll likely want it for sharing the host's connection with the guest.

#Installs dependencies for getting/building the kernel
sudo apt update && sudo apt-get install -y build-essential bc git curl wget xxd kmod libssl-dev

Then compiling the kernel and the kernel modules (you need the modules), and replacing them in the /boot folder, it will work

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM