How to change pinned CPUs for a VM in RHEV 3 ?
Issue
- How to change pinned CPUs for a VM in RHEV 3? For ex. need to move pinned CPUs from 16-20 to 12-15.
[RHEVM shell (connected)]# show vm VM-NAME
<snip>
cpu-cpu_tune-vcpu_pin-cpu_set: 20
cpu-cpu_tune-vcpu_pin-vcpu : 0
cpu-cpu_tune-vcpu_pin-cpu_set: 21
cpu-cpu_tune-vcpu_pin-vcpu : 1
cpu-cpu_tune-vcpu_pin-cpu_set: 22
cpu-cpu_tune-vcpu_pin-vcpu : 2
cpu-cpu_tune-vcpu_pin-cpu_set: 23
cpu-cpu_tune-vcpu_pin-vcpu : 3
<snip>
-
When local storage is used for the VMs, they do not have the an option to change cpu pinning from RHEV-M GUI using
Edit VM
->Show Advanced Options
->Resource Allocation
=>CPU Shares and CPU Pinning
. So we need an alternate way to change CPU pinning. -
Updating CPU pinning using
rhevm-shell
fails when VM is already pinned to certain set of CPU's. Need an option to unpin and pin the VM again
[RHEVM shell (connected)]# update vm VM-NAME --cpu-cpu_tune-vcpu_pin "vcpu_pin.cpu_set=12,vcpu_pin.vcpu=0" --cpu-cpu_tune-vcpu_pin "vcpu_pin.cpu_set=13,vcpu_pin.vcpu=1" --cpu-cpu_tune-vcpu_pin "vcpu_pin.cpu_set=14,vcpu_pin.vcpu=2" --cpu-cpu_tune-vcpu_pin "vcpu_pin.cpu_set=15,vcpu_pin.vcpu=3"
status: 400
reason: Bad Request
detail: Cannot configure CPU pinning twice to the same vCPU.
Environment
- Red Hat Enterprise Virtualization 3.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.