- 积分
- 9464
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 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. |
|