简体   繁体   English

如何在 Nvidia Jetson Nano 上启用 KVM / 如何构建支持 KVM 的内核?

[英]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.我正在尝试在我的 Nvidia Jetson Nano 上运行firecracker ,这是一个 KVM 虚拟化工具。 However, it fails on the creation of the KVM device.但是,它在创建 KVM 设备时失败。 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.事实证明没有/dev/kvm ,所以我猜内核没有在 KVM 支持下编译,或者应该有一个选项来启用 KVM。

I'm running the official ubuntu image provided by them.我正在运行他们提供的官方 ubuntu 映像。

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.我在这里找到了内核+配置文件: https ://github.com/OE4T/linux-tegra-4.9/blob/oe4t-patches-l4t-r32.4/arch/arm64/configs/tegra_defconfig 但我需要知道哪个我需要添加配置以启用 KVM 支持,以及添加这些配置是否足以让 KVM 运行。

I recently made a tutorial on this: https://github.com/lattice0/jetson_nano_kvm我最近对此做了一个教程: 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. CONFIG_VHOST_NET不是必需的,但您可能希望它与来宾共享主机的连接。

#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然后编译内核和内核模块(你需要模块),并在 /boot 文件夹中替换它们,它会工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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