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

楼主 |
发表于 2022-5-27 14:20:23
|
显示全部楼层
How to enable Nested virtualization in OpenStack Cloud5 r0 `9 e( w" b# o
I have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
5 f: n7 h' S% T Y
/ H4 G: B* r( H7 cWe need to enable nested virtualization OpenStack cloud at the kernel level:
7 x, Q' X# O/ o2 [" j! k$ ^: Z; S
8 B- J' n x) w4 e2 I[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf8 Z% Q2 T3 [1 v% Z& z8 l8 s; B @
Modify the following settings in nova.conf file.
5 n* L4 U. o/ l0 h* Z( A! m- K: n4 ^; x) ^9 W5 H& I$ Q
virt_type=kvm9 O) b# t9 C6 x8 }! }+ m s
...
$ z+ y, ` B( u: Z g! T- mcpu_mode=host-passthrough% o# p) H4 h+ t8 N6 F
“host-passthrough” – use the host CPU model exactly
6 b1 a3 D+ O* S# v! z, s9 l, h5 O. I9 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.
# @( u; o* `- S2 T! ?3 Z; ]
! T" v5 }! {& f. m( q" I! o: }- N! w) f“host-model” – clone the host CPU feature flags- ]: {3 _, O- P
7 H/ {1 |- n) G0 q* K
Reboot your compute Host5 f1 w$ u+ `2 J
Validate that nested virtualization is enable at the kernel level:
) G A. z U2 w) U. Q( u7 P. o+ ?5 |/ j' B0 U8 u
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested* Z8 a# k, r! A. C* d/ Y. i2 H
Y
( U0 @7 F! Y, M5 ~' j: q% eLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:$ S' p( u0 q. E; Z5 e
% F7 A7 H' o7 U8 G/ _
[root@nested ~]# cat /proc/cpuinfo | grep vmx+ `* i% M! V! 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
! A9 b' p. Y3 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 xsaveopt
4 c- r- `' v! M( YThat’s all. A new virtual machine will be running as a hypervisor. |
|