Bug 1192875
| Summary: | Improve the error info when using virt-xml --update to edit graphics devices | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | tingting zheng <tzheng> |
| Component: | virt-manager | Assignee: | Pavel Hrdina <phrdina> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | dyuan, gscrivan, juzhou, mzhan, phrdina, qxiao, rbalakri, xiaodwan, zhwang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-manager-1.2.1-3.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 05:24:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
The error message is taken directly from libvirt, so moving this bug to libvirt. Well, after some research, the bug is in virt-xml. It uses config xml to update live domain, which is wrong. Moving back to virt-manager. Upstream commit:
commit 76bad650dea9f83305f4a77bf83dee34d79e5308
Author: Pavel Hrdina <phrdina>
Date: Thu Jul 2 14:09:46 2015 +0200
virt-xml: refactor the handling of --define and --update options
The code was wrong in many ways. The main issue was, that for live
updates we were using config XML instead of live XML.
This patch fixes the --update and --define options to work properly as
described in man page.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1192875
Signed-off-by: Pavel Hrdina <phrdina>
[~juzhou] Bug 1192875 I can reproduce the bug with build: virt-manager-1.1.0-12.el7.noarch virt-install-1.1.0-12.el7.noarch Try to verify this bug with package: virt-manager-1.2.1-4.el7.noarch virt-install-1.2.1-4.el7.noarch Steps: 1.Try to run virt-xml --update to edit graphics device for a running guest #virsh list Id Name State ---------------------------------------------------- 40 rhel7.0-2 running #virt-xml rhel7.0-2 --edit all --graphics password=foo --update ERROR Error attempting device update: internal error: unable to execute QEMU command 'set_password': Could not set password #virt-xml rhel7.0-2 --edit all --graphics password=foo --update --print-diff --- Original XML +++ Altered XML @@ -102,7 +102,7 @@ </input> <input type="mouse" bus="ps2"/> <input type="keyboard" bus="ps2"/> - <graphics type="spice" port="5900" autoport="yes" listen="127.0.0.1"> + <graphics type="spice" port="5900" autoport="yes" listen="127.0.0.1" passwd="foo"> <listen type="address" address="127.0.0.1"/> <image compression="off"/> </graphics> ERROR Error attempting device update: internal error: unable to execute QEMU command 'set_password': Could not set password 2. Run virt-xml --update to edit graphics device for a shutoff guest,it can be updated successfully. #virsh destroy rhel7.0-2 Domain rhel7.0-2 destroyed #virt-xml rhel7.0-2 --edit all --graphics password=foo --update Domain 'rhel7.0-2' defined successfully. Result: Step 1,t he error info is clear for users . Step 2, running the virt-xml for a shutdown guest works. move this bug from ON_QA 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/RHBA-2015-2206.html |
Description Improve the error info when using virt-xml --update to edit graphics devices Version: virt-manager-1.1.0-12.el7.noarch virt-install-1.1.0-12.el7.noarch How reproducible: 100% Steps to Reproduce: 1.Check virt-xml manual,check EXAMPLES part,there is an example about update graphics devices password using --update: EXAMPLES …… Update the every graphics device password to 'foo' of the running VM 'rhel6': # virt-xml rhel6 --edit all --graphics password=foo --update 2.Run the above commands for a running guest,the error info is not clear and may confuse users. # virsh list Id Name State ---------------------------------------------------- 24 rhel6.6 running # virt-xml rhel6.6 --edit all --graphics password=foo --update ERROR Error attempting device update: invalid argument: cannot change the number of listen addresses # virt-xml rhel6.6 --edit all --graphics password=foo --update --print-diff --- Original XML +++ Altered XML @@ -76,7 +76,7 @@ <input type="tablet" bus="usb"/> <input type="mouse" bus="ps2"/> <input type="keyboard" bus="ps2"/> - <graphics type="spice" autoport="yes"/> + <graphics type="spice" autoport="yes" passwd="foo"/> <sound model="ich6"> <address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0"/> </sound> ERROR Error attempting device update: invalid argument: cannot change the number of listen addresses 3.Try --update to edit other devices eg:sound for running guest,the error is clear: # virt-xml rhel6.6 --edit 2 --sound model=ich6 --update ERROR Error attempting device update: unsupported configuration: live update of device 'sound' is not supported Actual results: As description. Expected results: Improve the error info when using virt-xml --update to edit graphics devices for a running guest. Additional info: If I run virt-xml --update to edit graphics device for a shutoff guest,it can be updated successfully. # virsh destroy rhel6.6 Domain rhel6.6 destroyed # virt-xml rhel6.6 --edit all --graphics password=foo --update Domain 'rhel6.6' defined successfully.