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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-5-27 09:06:49 | 显示全部楼层 |阅读模式
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested
) a, [$ a* n2 l: h* G  Q$ ]/ gN( g( ~2 A. ?0 L$ z# d

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud
* O+ Y1 `7 w6 GI have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
( j  v) R+ e) X/ x; q' p) Y+ ?2 f  @8 [7 b1 G8 X
We need to enable nested virtualization OpenStack cloud at the kernel level:  h! V4 J; |" K. u( U
  F* P; C8 l: H
[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf: N1 w1 L; T1 q) F( ~% c
Modify the following settings in nova.conf file., S+ N" Q7 E6 c- i3 [2 T
  s9 I$ X) w: U7 o, X; n
virt_type=kvm
" M% V' `/ m( N. s...  i5 y* b. S4 `. L
cpu_mode=host-passthrough3 m5 O# |7 h9 j+ ~% Z
“host-passthrough” – use the host CPU model exactly$ P/ ~4 ]* _* T
6 {9 @( }6 Z! r) C' G
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.2 F- c) \$ e% @# `* ^, ?; i1 X$ e

8 i: J! n! w. e! _) E# u5 P& ~5 T“host-model” –  clone the host CPU feature flags7 K' c1 |8 J' Y5 N
+ Q. w& W$ p/ F& i( s$ I
Reboot your compute Host
5 g" f; k% P# Y7 y) g  I6 v7 RValidate that nested virtualization is enable at the kernel level:
+ y9 I* {" V; [0 i6 I2 i0 Z  v' Z! B: E
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested
1 T& z  f5 d+ n9 |$ dY( B" q" S" x3 o8 B' Z, [
Launch new instance on this node, and validate that your instance at the vmx cpu flag enable:
, y. }, H8 W8 e# Z. v2 T, b' {; ^! v% h8 Z- p1 X
[root@nested ~]# cat /proc/cpuinfo | grep vmx
5 g! P: e6 M+ [3 S- wflags : 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 xsaveopt8 e7 [/ B# {  i5 ~+ z; 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
7 n4 H3 z! m1 n$ a! S7 h9 b* dThat’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:10 , Processed in 0.017745 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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