易陆发现互联网技术论坛

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

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

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

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

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

x
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested * b0 w: R5 _7 R6 I" ?  b
N
% p* b" o3 v: b2 D
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud
2 X2 q" c& M4 s4 O) _0 \% CI have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
6 ~0 q6 J! R. r1 W9 K1 G' H" \) G- T0 J% L, L- l- l' Y1 V
We need to enable nested virtualization OpenStack cloud at the kernel level:
8 q9 o- U; |/ _" F# C/ t; d0 `3 O
* `' o0 p# w' X3 N; k2 k3 ^[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf+ t5 h1 m3 s# |) M% a, y9 C
Modify the following settings in nova.conf file.
# f1 g7 R6 d. {/ I0 {! \; g' o, V
virt_type=kvm
: u( l0 F7 m* n9 V/ _...
- @4 K" `# y4 Ccpu_mode=host-passthrough
( _1 r& _0 J  o9 {“host-passthrough” – use the host CPU model exactly, i# D0 B8 k; }; N+ Y" C6 M7 O
5 l9 {& ?) d, P5 ^( d3 D: 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.1 R; o" Q; C) |" Q, P
" a( k1 v* j, r9 e+ A4 L3 z
“host-model” –  clone the host CPU feature flags
3 f3 \$ M7 ]5 @( P, W
) |1 J# [1 s) K- s1 y. q+ cReboot your compute Host6 y  O  X2 l% e2 [; [( \
Validate that nested virtualization is enable at the kernel level:
) `  {$ ]) U( \, `# E" N8 O5 U) g' h  ?; @: o
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested
4 \5 p( T+ T& M: |3 q4 s4 mY
5 [2 k3 Y& X3 }8 Q. }0 ~Launch new instance on this node, and validate that your instance at the vmx cpu flag enable:
$ b; o0 C# K4 f  f) A$ d: D4 r4 V
) {! }" Q% a) X4 J[root@nested ~]# cat /proc/cpuinfo | grep vmx- H, d2 j( Y7 V' B) V
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& B7 z# b' D$ f/ B9 |7 t# {' K* 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
9 G! s9 n& w6 X& {That’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

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

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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