将设为首页浏览此站
开启辅助访问 天气与日历 收藏本站联系我们切换到窄版

易陆发现论坛

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

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

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

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

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

x
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested
: C7 h% ], B7 BN
9 I: C7 W9 G2 T/ y- I
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud2 @3 S* _6 N# u2 ?4 W
I have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.- e6 F- \! j7 x8 U& P. K7 K

7 n9 L4 P3 i/ I7 O; d, w; HWe need to enable nested virtualization OpenStack cloud at the kernel level:
- b4 X' C( ]2 K! F& F$ d$ K  b+ P
/ Z7 r. G, e, u. {  r  m. U2 s[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf/ G6 r3 t( k) h, R4 J# k: ]/ R3 H
Modify the following settings in nova.conf file.
" y0 U* N( Y9 C9 }: z9 l- O4 ?8 S
& `! J: h% m2 k+ h) s- E6 y. Xvirt_type=kvm
: `+ o9 I# p$ A- K. o3 k* L...
' h  x2 s- W# E  L/ pcpu_mode=host-passthrough
( `2 G2 J% O' _8 S% `( g' w! W“host-passthrough” – use the host CPU model exactly$ ]7 d5 Z) T% Y; q- [6 t
- D4 S: c; I0 O5 S7 m* O
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.% }* H# ]8 C0 q3 m; l  j/ {/ ]

7 D' t! Q+ B* C# |“host-model” –  clone the host CPU feature flags
/ I$ B( I' V7 a! C& i
! ~# J5 s) H1 P( }" @9 P% R$ TReboot your compute Host! X  w, X; ^4 H' d2 b1 W- u  A
Validate that nested virtualization is enable at the kernel level:. {, \: y; A& O" o

; k3 A: M8 v* @" z' H8 j3 ]8 R; N[root@openstack]# cat /sys/module/kvm_intel/parameters/nested
# x4 k& h! C$ T: c. [Y
$ D4 w9 M5 `* T$ e. }/ M. f5 VLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:" e7 M$ F' ^3 Q3 S

2 o5 v- u  v2 U' H[root@nested ~]# cat /proc/cpuinfo | grep vmx+ T* _, q* _, ^" ~! w* 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
( e0 t7 z1 B6 K; f: \) F7 z3 yflags : 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
+ b. U% l2 d; v1 EThat’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

如有购买积分卡请联系497906712

QQ|返回首页|Archiver|手机版|小黑屋|易陆发现 点击这里给我发消息

GMT+8, 2022-7-4 11:17 , Processed in 0.038928 second(s), 22 queries .

Powered by LR.LINUX.cloud bbs168x X3.2 Licensed

© 2012-2022 Comsenz Inc.

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