5
在我已经虚拟化主机,试图通过该选项的选项-enable-kvm -m 1024
,将失败:嵌套虚拟化KVM:-enable-KVM在嵌套虚拟化QEMU
qemu-system-x86_64 -vga std -enable-kvm -m 1024 -monitor telnet:localhost:9313,server,nowait -drive file=my_img.img,cache=none
# Could not access KVM kernel module: No such file or directory
# failed to initialize KVM: No such file or directory
如果删除该选项-enable-kvm -m 1024
,QEMU将加载(但需要永远的,因为它是用软件模拟):
qemu-system-x86_64 -vga std -monitor telnet:localhost:9313,server,nowait -drive file=my_img.img,cache=none
# qemu running, OK, but image taking forever to load.
当然,我的这个虚拟主机有筑巢自己的虚拟化能力。我到处都找不到有关它的信息[喜欢这里:https://docs.openstack.org/developer/devstack/guides/devstack-with-nested-kvm.html]告诉我,我必须检查的文件/sys/module/kvm_intel/parameters/nested
这简直是不可用的,因为kvm-intel
是不是,不能从图像中加载:
sudo modprobe kvm-intel
# modprobe: ERROR: could not insert 'kvm_intel': Operation not supported
调试嵌套虚拟化的方法可能只适用于裸机。 那么,如何从kvm内启用(转发支持)kvm?
附加信息:
lscpu # from inside the virtualized host
# Architecture: x86_64
# ...
# Vendor ID: GenuineIntel
# CPU family: 6
# Model: 13
# Model name: QEMU Virtual CPU version (cpu64-rhel6)
# Stepping: 3
# ...
# Hypervisor vendor: KVM
QEMU的ltrace
:
# open64("/dev/kvm", 524290, 00) = -1
# __errno_location() = 0x7f958673c730
# __fprintf_chk(0x7f957fd81060, 1, 0x7f9586474ce0, 0Could not access KVM kernel module: No such file or directory