linux kvm 嵌套虚拟化,嵌套虚拟化与KVM:嵌套虚拟化中的qemu中的-enable-kvm

在我已经虚拟化的主机中,尝试传递选项 -enable-kvm -m 1024 将失败:

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 isn 't and can' t从图像内部加载:

sudo modprobe kvm-intel

# modprobe: ERROR: could not insert 'kvm_intel': Operation not supported

调试嵌套虚拟化的方法可能仅适用于裸机 . So, how do I enable (forward the support of) kvm from inside a 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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值