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 596100 - device hotplug/update changes are not transient
Summary: device hotplug/update changes are not transient
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 623066 (view as bug list)
Depends On:
Blocks: Rhel6.1LibvirtTier1
TreeView+ depends on / blocked
 
Reported: 2010-05-26 10:18 UTC by Johnny Liu
Modified: 2018-11-14 19:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:19:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Johnny Liu 2010-05-26 10:18:00 UTC
Description of problem:
Change vnc password on the fly via "virsh update-device", then shutdown the guest, re-start the guest, when connect the guest windows, the new password still take effect.
As my understand, after the guest is shutdown, the vnc password should be restored to original password for next connection. 

Version-Release number of selected component (if applicable):
libvirt-0.8.1-6.el6.x86_64
qemu-kvm-0.12.1.2-2.54.el6.x86_64
kernel-2.6.32-27.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Define a domain with a vnc password in xml config file
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='123456'/>
...
2. Start the guest, and use virt-viewer to connect the guest windows with "aaabbb" password
3. Change password on the fly.
# cat vnc_passwd.xml 
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='222222'/>
# virsh update-device winxp vnc_passwd.xml 
Device updated successfully
4. Connect the guest windows successfully with new password "222222"
5. Shutdown the guest.
6. Start the guest again.
7. Try to Connect the guest windows with old password "123456".

  
Actual results:
With old password "123456", connect failed. With new password "222222", connect is successful.

# virsh dumpxml <guestname>
...
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1' keymap='en-us'/>
...

# cat /etc/libvirt/qemu/<guestname>.xml
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='123456'/>
...

# virsh edit <guestname>
...
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' keymap='en-us' passwd='222222'/>
...

Expected results:
With old password "123456", connect should be successful.

Additional info:
After I restart libvirtd, the original password take effect.

When I try to run this command with "--persistent", but it failed with the following error, I am not sure it is expected.
# virsh update-device winxp vnc_passwd.xml --persistent
error: Failed to update device from vnc_passwd.xml
error: Requested operation is not valid: cannot modify the persistent configuration of a domain

Comment 2 RHEL Program Management 2010-06-07 15:59:09 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Daniel Berrangé 2010-10-11 15:44:56 UTC
This may or may not be a bug, if not, we at least need to better document the semantics of changing the password.

Comment 5 Cole Robinson 2010-11-19 15:58:51 UTC
This is definitely not intended behavior. AFAICT with current upstream, any hotplug changes are persisted in memory until the domain is redefined or libvirtd is restarted. Pretty sure things didn't work this way in the past (verifying now), but at the very least that behavior is non-obvious.

Comment 6 Daniel Berrangé 2010-11-23 11:22:33 UTC
Should be addressed by

http://www.redhat.com/archives/libvir-list/2010-November/msg00999.html

Comment 7 Cole Robinson 2010-11-29 19:31:51 UTC
*** Bug 623066 has been marked as a duplicate of this bug. ***

Comment 9 Wayne Sun 2011-01-11 02:15:42 UTC
Verified.

Packages:
# rpm -qa |grep libvirt
libvirt-client-0.8.7-1.el6.x86_64
libvirt-0.8.7-1.el6.x86_64
libvirt-python-0.8.7-1.el6.x86_64

Steps to Reproduce:
Steps are the same as in the bug description.

Comment 11 Cui Chun 2011-02-09 07:29:43 UTC
Rechecked it on the following test environment according to description. It is passed.

Test environment:
libvirt-0.8.7-5.el6
qemu-kvm-0.12.1.2-2.144.el6
kernel-2.6.32-94.el6

Comment 15 errata-xmlrpc 2011-05-19 13:19:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html


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