带有 /dev /kvm模块的docker映像
我想在我的Docker图像中使用KVM。 KVM和QEMU-SYSTEM-X86_64安装在 /usr /bin下,但是当我运行时。 /usr/bin/qemu-system-x86_64 -enable-kvm
我得到了
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
我能够通过添加- device =/dev/kvm
来解决错误。
我的问题是,为什么需要从我的主机附加此KVM模块?为什么需要在 /开发目录中?
I want to use kvm in my docker image. kvm and qemu-system-x86_64 are installed under /usr/bin but when I run eg. /usr/bin/qemu-system-x86_64 -enable-kvm
I'm getting
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize KVM: No such file or directory
I was able to fix to error by adding --device=/dev/kvm
to docker run command.
My question is why this kvm module need to be attached from my host? Why it's required to be under /dev directory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论