易陆发现互联网技术论坛

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

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

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

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

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

x
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested
/ u6 y$ M$ t% n2 u4 i% ^N
  g& s0 m" y' c4 p- s$ H
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud
* g1 d9 T0 v# U  h1 G% |* G: G! eI have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
" c, O: m* d) f5 z# }  E: v# X/ t
We need to enable nested virtualization OpenStack cloud at the kernel level:+ j& q) G( L; Y
& x9 K5 m+ @9 o) [2 ]/ V' D
[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf
8 Z% ]" V5 ~2 A0 y, z% JModify the following settings in nova.conf file.
$ a. d& O$ a- {8 Q8 S* a
3 Z! @8 r. |! [* Gvirt_type=kvm
  y1 U" H0 g3 x% Y) D...
! ]2 C% r# n7 t, E+ |5 Wcpu_mode=host-passthrough. A) k( Q) G( J; T
“host-passthrough” – use the host CPU model exactly
3 Z) a, J* T5 O  W; `2 @( `8 y+ T+ _6 [* G( Q2 v
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.: X  ]1 h0 y' E. U
' {0 W' Z' a* ~( U
“host-model” –  clone the host CPU feature flags/ _* v6 G, s/ b" e

5 a4 P5 g' {1 q# XReboot your compute Host
; T$ U- o2 r7 b% @/ OValidate that nested virtualization is enable at the kernel level:9 c  L- w5 X' R( r5 ]6 d
- `0 v) A! v. j7 L9 y. m# K1 Z$ m
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested4 @) u1 m. u+ o  i5 O
Y
  g% j$ l5 ]# `6 k) ILaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:" [; s. w  Z3 W) P5 A6 o) S
' [' `0 k+ ~  @" Z! z/ U
[root@nested ~]# cat /proc/cpuinfo | grep vmx3 n3 h. ^; Q, L7 F1 h
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& |+ V* d0 I7 g8 |% I6 O8 g
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: h# N) l# v. D0 @3 u6 I
That’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

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

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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