Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
error not correct when hot-plug/unplug a vcpu via agent
Version-Release number of selected component (if applicable):
libvirt-1.2.17-1.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.prepare a offline guest with agent:
# virsh dumpxml test3
...
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/test3.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='8'/>
</channel>
...
2.
# virsh setvcpus test3 --guest 1
error: Guest agent is not responding: QEMU guest agent is not connected
3.
Actual results:
error in step 2 is not correct, guest is not running so the main issue is domain status is not correct
Expected results:
error should like this:
error: Operation not supported: setting vcpus via guest agent isn't supported on offline domain
or
error: Requested operation is not valid: domain is not running
Additional info:
This seems a error message regression, test with libvirt-1.2.14:
# virsh setvcpus test3 --guest 1
error: Operation not supported: setting vcpus via guest agent isn't supported on offline domain
And upstream patch:
commit 0b3fcfb1eac845ba24ac2ad6eefb969d5f7b8395
Author: Luyao Huang <lhuang>
Date: Fri Jul 3 14:58:05 2015 +0800
qemu: move the guest status check before agent config and status check
When use setvcpus command with --guest option to a offline vm,
we will get error:
# virsh setvcpus test3 1 --guest
error: Guest agent is not responding: QEMU guest agent is not connected
However guest is not running, agent status could not be connected.
In this case, report domain is not running will be better than agent is
not connected. Move the guest status check more early to output error to
point out guest status is not right.
Also from the logic, a running vm is a basic requirement to use
agent, we cannot use agent if vm is not running.
Signed-off-by: Luyao Huang <lhuang>
Signed-off-by: Michal Privoznik <mprivozn>
Verify it as follows. The result is expected. Move its status to VERIFIED.
# rpm -q libvirt
libvirt-1.2.17-3.el7.x86_64
# virsh destroy test4
Domain test4 destroyed
# virsh dumpxml test4
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/test4.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
# virsh setvcpus test4 --guest 1
error: Requested operation is not valid: domain is not running
# virsh setvcpus test4 --guest 5
error: invalid argument: requested vcpus is greater than max allowable vcpus for the domain: 5 > 4
# virsh setvcpus test4 --guest 3
error: Requested operation is not valid: domain is not running
# virsh start test4
Domain test4 started
# virsh setvcpus test4 --guest 3
error: Guest agent is not responding: Guest agent not available for now
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/RHBA-2015-2202.html
Description of problem: error not correct when hot-plug/unplug a vcpu via agent Version-Release number of selected component (if applicable): libvirt-1.2.17-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare a offline guest with agent: # virsh dumpxml test3 ... <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/test3.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='8'/> </channel> ... 2. # virsh setvcpus test3 --guest 1 error: Guest agent is not responding: QEMU guest agent is not connected 3. Actual results: error in step 2 is not correct, guest is not running so the main issue is domain status is not correct Expected results: error should like this: error: Operation not supported: setting vcpus via guest agent isn't supported on offline domain or error: Requested operation is not valid: domain is not running Additional info: This seems a error message regression, test with libvirt-1.2.14: # virsh setvcpus test3 --guest 1 error: Operation not supported: setting vcpus via guest agent isn't supported on offline domain And upstream patch: commit 0b3fcfb1eac845ba24ac2ad6eefb969d5f7b8395 Author: Luyao Huang <lhuang> Date: Fri Jul 3 14:58:05 2015 +0800 qemu: move the guest status check before agent config and status check When use setvcpus command with --guest option to a offline vm, we will get error: # virsh setvcpus test3 1 --guest error: Guest agent is not responding: QEMU guest agent is not connected However guest is not running, agent status could not be connected. In this case, report domain is not running will be better than agent is not connected. Move the guest status check more early to output error to point out guest status is not right. Also from the logic, a running vm is a basic requirement to use agent, we cannot use agent if vm is not running. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Michal Privoznik <mprivozn>