简单介绍
可以使用以下元素指定CPU「型号」、「特征」、「拓扑」。
<cpu match='exact'> <model fallback='allow'>core2duo</model> <vendor>Intel</vendor> <topology sockets='1' cores='2' threads='1'/> <cache level='3' mode='emulate'/> <feature policy='disable' name='lahf_lm'/> </cpu>
<cpu mode='host-model'> <model fallback='forbid'/> <topology sockets='1' cores='2' threads='1'/> </cpu>
<cpu mode='host-passthrough'> <cache mode='passthrough'/> <feature policy='disable' name='lahf_lm'/> ...
如果不需要对CPU「型号」及其「特征」进行限制,可以简单的使用一个cpu元素:
<cpu> <topology sockets='1' cores='2' threads='1'/> </cpu>
配置结构
一个完整的结构如下:
<cpu match="minimum/exact/strict" check="none/partial/full" mode="custom/host-model/host-passthrough">
<model />
<vendor />
<topology sockets='1' cores='2' threads='1'/>
<feature />
<cache />
<numa>
<cell id="" cpus="" memory="" unit="" memAccess="" discard="">
<distances>
<sibling id='' value=''/>
</distances>
</cell>
</numa>
</cpu>
本文详细解读了KVM中CPU配置的不同模式,包括精确匹配、主机模型和直通模式,以及它们各自的结构和使用场景。还介绍了如何配置CPU型号、特性、拓扑和缓存策略。适合理解KVM虚拟化中CPU配置的开发者和技术人员。
2339

被折叠的 条评论
为什么被折叠?



