易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 697|回复: 1
收起左侧

查看操作系统是否支持kvm嵌套

[复制链接]
发表于 2022-5-27 09:06:49 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested
! L9 s3 v7 U" mN
2 |  s* v; I3 y- h7 a# J/ e
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud5 r0 `9 e( w" b# o
I have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
5 f: n7 h' S% T  Y
/ H4 G: B* r( H7 cWe need to enable nested virtualization OpenStack cloud at the kernel level:
7 x, Q' X# O/ o2 [" j! k$ ^: Z; S
8 B- J' n  x) w4 e2 I[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf8 Z% Q2 T3 [1 v% Z& z8 l8 s; B  @
Modify the following settings in nova.conf file.
5 n* L4 U. o/ l0 h* Z( A! m- K: n4 ^; x) ^9 W5 H& I$ Q
virt_type=kvm9 O) b# t9 C6 x8 }! }+ m  s
...
$ z+ y, `  B( u: Z  g! T- mcpu_mode=host-passthrough% o# p) H4 h+ t8 N6 F
“host-passthrough” – use the host CPU model exactly
6 b1 a3 D+ O* S# v! z, s9 l, h5 O. I9 Q
this causes libvirt to tell KVM to passthrough the host CPU with no modifications. The difference to host-model, instead of just matching feature flags, every last detail of the host CPU is matched.
# @( u; o* `- S2 T! ?3 Z; ]
! T" v5 }! {& f. m( q" I! o: }- N! w) f“host-model” –  clone the host CPU feature flags- ]: {3 _, O- P
7 H/ {1 |- n) G0 q* K
Reboot your compute Host5 f1 w$ u+ `2 J
Validate that nested virtualization is enable at the kernel level:
) G  A. z  U2 w) U. Q( u7 P. o+ ?5 |/ j' B0 U8 u
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested* Z8 a# k, r! A. C* d/ Y. i2 H
Y
( U0 @7 F! Y, M5 ~' j: q% eLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:$ S' p( u0 q. E; Z5 e
% F7 A7 H' o7 U8 G/ _
[root@nested ~]# cat /proc/cpuinfo | grep vmx+ `* i% M! V! a
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm tpr_shadow vnmi flexpriority ept fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
! A9 b' p. Y3 Cflags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm tpr_shadow vnmi flexpriority ept fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
4 c- r- `' v! M( YThat’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 15:21 , Processed in 0.052953 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表