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