易陆发现互联网技术论坛

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

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

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

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

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

x
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested ' R0 l1 B, e( Y, s/ l
N. j8 `( T. U# v) l( M
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud
3 @0 U) ]. l- A$ W. h, mI have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
$ A, ]# b  i" `# k8 }. q$ `1 B7 r8 ^4 t# |6 z% c7 }1 n/ ^; j- r
We need to enable nested virtualization OpenStack cloud at the kernel level:
/ h1 z3 q. j4 U) t* n. A, r
, x" \2 A$ {, b7 j; M$ p# g  Z; T[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf* V! c; U# E- H: G
Modify the following settings in nova.conf file.
4 E& W: O# K- v: }2 [1 c* {6 d: n2 Y# S+ B7 q* L) ^) T0 y
virt_type=kvm
" i  n, W; k6 b, E...( E+ c3 k; ?+ }2 A& y# D
cpu_mode=host-passthrough
% w) S' C" |+ Y4 q* i1 z& {2 b/ b0 U“host-passthrough” – use the host CPU model exactly
8 j' }- `) p3 F% _: z: p( A
0 F, |# t# X# {7 J- g' Pthis 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  B1 E/ `2 l* p/ f

9 {8 _/ g; y# H. I: @“host-model” –  clone the host CPU feature flags& m6 L! N2 i& M& }
" L& Z9 B; v6 s  H* Z+ ?
Reboot your compute Host, s) J+ x" P5 |5 M9 ~3 _8 m8 H* q
Validate that nested virtualization is enable at the kernel level:
  r  \1 v2 a$ i+ f: c9 @9 S6 V& z% F3 w. V9 y: C- o
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested8 i7 M  R! j# ~1 {
Y
- q7 D; Z& p7 ?: t8 R1 BLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:
; p9 `+ y+ Z( H! B) L3 j) z% F: J4 o* b$ m  q+ g
[root@nested ~]# cat /proc/cpuinfo | grep vmx
: }" K- H( v8 q& f& k1 }! 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 xsaveopt1 T: S1 ^9 l1 G$ B3 j
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: m) O. `7 N& D3 ]
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:19 , Processed in 0.047717 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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