找回密码
 注册
查看: 694|回复: 1

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-5-27 09:06:49 | 显示全部楼层 |阅读模式
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested 0 L7 [5 k5 S8 D( ]+ {) U
N7 m; v1 }, ?, u! @2 O

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud( W% ]( z" n) M2 t$ T
I have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine., v! ~8 R2 ^3 l% f: o9 U

+ k( V' J; h6 O9 f( o! S( q2 S4 jWe need to enable nested virtualization OpenStack cloud at the kernel level:
2 X" r( y& h# A$ v) }
6 c3 ]2 X7 ^7 b) ~7 ?$ k" @6 @[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf! U0 p, b7 Z( P( [& F7 P' d
Modify the following settings in nova.conf file., R- Z- R$ b& y4 x$ \

2 q& L& @& P- S1 A# e8 _2 jvirt_type=kvm
* O1 o5 }5 U+ y3 c! r/ ?...9 e. }  Y  c3 t8 ?4 J
cpu_mode=host-passthrough4 \( v0 t: h1 ~( L2 v( D
“host-passthrough” – use the host CPU model exactly& q8 c4 W# ^9 M! e4 l9 q- Z
, X& ]6 ]! J2 ?
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.0 I9 M5 y3 {/ ]4 A
0 u. Q+ O" r, t0 p1 e) H
“host-model” –  clone the host CPU feature flags' a) K1 |% G" H3 r
6 e# N( g) v* F5 I- n0 q
Reboot your compute Host
7 S# B0 Z0 Q( j5 e% V6 FValidate that nested virtualization is enable at the kernel level:- }. v. k5 h/ j7 d4 s- H# _
  |1 k! [0 b* Z+ `4 @) O+ W
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested) E0 k4 U% l4 v. F2 X6 o) Z- S+ M4 v
Y
  Q4 t2 P9 u2 r2 BLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:9 \! }4 Q4 |8 [- C% C0 [

  B, \1 S3 ]( v: I" y! n+ U8 d  z[root@nested ~]# cat /proc/cpuinfo | grep vmx# \5 i% D+ O% a6 l) b
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# i9 E: @6 W4 e- c. t  Z' D6 a3 P) l
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
. L' R5 {$ C8 T, c% Z) yThat’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:09 , Processed in 0.014906 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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