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

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