虚拟机绑核

2024-01-29 15:24:30 浏览数 (1)

virsh edit vm-name

添加如下参数:

<cputune>

<vcpupin vcpu='0' cpuset='2'/>

<vcpupin vcpu='1' cpuset='3'/>

<vcpupin vcpu='2' cpuset='4'/>

<vcpupin vcpu='3' cpuset='5'/>

<vcpupin vcpu='4' cpuset='6'/>

<vcpupin vcpu='5' cpuset='7'/>

<vcpupin vcpu='6' cpuset='8'/>

<vcpupin vcpu='7' cpuset='9'/>

<vcpupin vcpu='8' cpuset='10'/>

<vcpupin vcpu='9' cpuset='11'/>

<vcpupin vcpu='10' cpuset='12'/>

<vcpupin vcpu='11' cpuset='13'/>

<vcpupin vcpu='12' cpuset='14'/>

<vcpupin vcpu='13' cpuset='15'/>

<vcpupin vcpu='14' cpuset='16'/>

<vcpupin vcpu='15' cpuset='17'/>

<emulatorpin cpuset='0-15'/>

</cputune>

修改后重启虚拟机,在物理机查看亲和性

Virsh vcpupin vm-name

0 人点赞