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.
Bug 1192875 - Improve the error info when using virt-xml --update to edit graphics devices
Summary: Improve the error info when using virt-xml --update to edit graphics devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-16 03:02 UTC by tingting zheng
Modified: 2015-11-19 05:24 UTC (History)
9 users (show)

Fixed In Version: virt-manager-1.2.1-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:24:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2206 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-11-19 08:17:29 UTC

Description tingting zheng 2015-02-16 03:02:05 UTC
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.

Comment 1 Pavel Hrdina 2015-06-19 13:31:58 UTC
The error message is taken directly from libvirt, so moving this bug to libvirt.

Comment 2 Pavel Hrdina 2015-07-01 08:30:28 UTC
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.

Comment 3 Pavel Hrdina 2015-07-07 15:07:36 UTC
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>

Comment 6 XiaoQing 2015-07-29 10:08:02 UTC
[~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.

Comment 8 errata-xmlrpc 2015-11-19 05:24:09 UTC
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


Note You need to log in before you can comment on or make changes to this bug.