Red Hat Bugzilla – Bug 1097677
libvirt loses track of hotplugged vcpus after daemon restart
Last modified: 2016-04-26 09:51:40 EDT
Fixed upstream by: commit b396e602c97ab69c86dfd84d2f9e48b4c04a48a4 Author: Ján Tomko <jtomko@redhat.com> CommitDate: 2014-04-23 14:24:21 +0200 Save domain status after cpu hotplug The live change of vcpus was not reflected in the domain status xml and it got lost during libvirtd restart. https://bugzilla.redhat.com/show_bug.cgi?id=1088703 git describe: v1.2.3-149-gb396e60 contains: v1.2.4-rc1~78
# rpm -q libvirt libvirt-1.2.8-9.el7.x86_64 1. configure guest with 3 vcpus online # virsh edit r7a ... <vcpu placement='auto' current='3'>6</vcpu> ... # virsh vcpuinfo r7a VCPU: 0 CPU: 2 State: running CPU time: 4.3s CPU Affinity: yyyyyyyy VCPU: 1 CPU: 2 State: running CPU Affinity: yyyyyyyy VCPU: 2 CPU: 3 State: running CPU Affinity: yyyyyyyy 2. online one more vcpu # virsh setvcpus r7a 4 # virsh vcpuinfo r7a VCPU: 0 CPU: 1 State: running CPU time: 7.9s CPU Affinity: yyyyyyyy VCPU: 1 CPU: 1 State: running CPU time: 1.0s CPU Affinity: yyyyyyyy VCPU: 2 CPU: 0 State: running CPU time: 0.9s CPU Affinity: yyyyyyyy VCPU: 3 CPU: 6 State: running CPU Affinity: yyyyyyyy 3. restart libvirtd then check vcpuinfo # systemctl restart libvirtd # virsh vcpuinfo r7a VCPU: 0 CPU: 2 State: running CPU time: 8.6s CPU Affinity: yyyyyyyy VCPU: 1 CPU: 1 State: running CPU time: 1.7s CPU Affinity: yyyyyyyy VCPU: 2 CPU: 0 State: running CPU time: 1.5s CPU Affinity: yyyyyyyy VCPU: 3 CPU: 6 State: running CPU Affinity: yyyyyyyy As we could see, vcpuinfo is same with libvirt restarted before. So change the status to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html