When you install a VM on XenServer, the cpu affinity is set to «any cpu» by default.
How to change this setting and do you set the cpu affinity?
You can use «xl vcpu-list» to see details about the cpu/vcpu for the VM and Domain.
If you need set the affinity for a specific server, you can do the next command:
«xl vcpu-pin [domain_name/vm_name] [vpu/all] [cpu/all]»
In my example, i set the cpu 0 to de vcpu 0 on the «services» machine.
If you don’t need affinity, you can do a rollback using «all».
Examples:
xl vcpu-pin 101.CTXDOM.SERVICES 0 0
* set the affinity for vcpu 0 to cpu 0.
xl vcpu-pin 101.CTXDOM.SERVICES 0 all
* set the affinity for vcpu 0 to any cpu
Leave a Reply