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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-5-27 09:06:49 | 显示全部楼层 |阅读模式
[root@compute03 images]# cat /sys/module/kvm_intel/parameters/nested & r4 @  G! x. E
N. a% u0 _0 E5 A, u  ?/ G8 k3 |

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-5-27 14:20:23 | 显示全部楼层
How to enable Nested virtualization in OpenStack Cloud7 V+ y) s( l% ?
I have installed OpenStack using PackStack in our physical server. After successfully installed, verified that the setup is working fine.
. |' E) H& X8 y4 ~; Q2 S$ b' _0 V% P7 a7 @2 q8 H
We need to enable nested virtualization OpenStack cloud at the kernel level:
2 F" r5 E: c. z3 v! z4 l7 @0 t5 \2 I
[root@openstack]#echo "options kvm-intel nested=y" >> /etc/modprobe.d/dist.conf/ z3 R; e0 F! Z' d: A3 k% N7 R9 d
Modify the following settings in nova.conf file.- L$ V8 I& v/ A1 p3 a- ^- A
! v' v, ]1 u2 _) t7 R" q6 \
virt_type=kvm
) O$ u" L0 ~4 ~3 b  ^+ _$ w2 T% I6 K$ t/ G...4 N! s) M: M3 R1 S2 N3 `5 F
cpu_mode=host-passthrough
* J. M" G( e9 k7 N$ j“host-passthrough” – use the host CPU model exactly, u. Y" L0 X& d/ x
& y) M! Z& _% Z" H! ]
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." S! P! Z8 g. `) r6 _, f/ d
! c: Q$ t2 s5 |8 Z
“host-model” –  clone the host CPU feature flags
! Y+ N. f0 A! R
- V6 B0 ^4 n% |/ F% m# I1 A  |3 nReboot your compute Host) g! z0 U) \8 b1 M7 y; d
Validate that nested virtualization is enable at the kernel level:3 D4 J, v9 J! e, u* t; G
2 w  ~. ^8 T( E3 _. Y
[root@openstack]# cat /sys/module/kvm_intel/parameters/nested% M' ?1 p3 P2 ?! g
Y
' N; m4 S. A2 `! gLaunch new instance on this node, and validate that your instance at the vmx cpu flag enable:
7 N0 L5 \; G- E7 D9 @9 a6 }* d" p5 I+ k% [3 U
[root@nested ~]# cat /proc/cpuinfo | grep vmx
1 u( l7 a% r" s! O& N/ i" h6 @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
3 g5 a0 ]- Z% b; j: p0 n& ]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 xsaveopt8 h7 e' M# T! O. c  H; x8 J/ i
That’s all. A new virtual machine will be running as a hypervisor.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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