PS:前提是虚拟cpu总个数不多于物理cpu总个数。
 
绑定方法:
虚拟机的虚拟cpu有1个,实体机物理cpu有8个,可以通过以下方式绑定cpu,绑定的动作不一定要在虚机启动时,可以在任何时候:
绑定前:
[root@3 ~]# virsh vcpuinfo 1
VCPU:           0                    虚拟cup0
CPU:            1                   物理cpu1
State:          running 
CPU time:       1.3s
CPU Affinity:   yyyyyyyy                 虚拟cpu与物理cpu对应关系位图, 'y'表示虚拟cpu0能绑定到物理cpu1, '-'表示虚拟cpu0不能绑定到其他cpu
 
绑定命令:
[root@3 ~]# virsh  vcpupin 1  0 1        将domain 1的cpu0绑定到物理cpu1
 
绑定后:
[root@3 ~]# virsh vcpuinfo 1
VCPU:           0                           虚拟cup0
CPU:            1                          物理cpu1
State:          running 
CPU time:       1.3s
CPU Affinity:   -y------                     虚拟cpu与物理cpu对应关系位图, 'y'表示虚拟cpu0能绑定到物理cpu1, '-'表示虚拟cpu0不能绑定到其他cpu

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-02-27
  • 2021-09-05
  • 2021-11-23
  • 2021-07-23
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-08-23
  • 2021-06-05
  • 2021-04-13
  • 2022-12-23
相关资源
相似解决方案