Bug 596100 - device hotplug/update changes are not transient
Summary: device hotplug/update changes are not transient
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
: 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:
Last Closed: 2011-05-19 13:19:03 UTC
Target Upstream Version:

Attachments (Terms of Use)

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):

How reproducible:

Steps to Reproduce:
1. Define a domain with a vnc password in xml config file
<graphics type='vnc' port='-1' autoport='yes' listen='' 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='' 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='' keymap='en-us'/>

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

# virsh edit <guestname>
<graphics type='vnc' port='-1' autoport='yes' listen='' 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

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


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

# rpm -qa |grep libvirt

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:

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.


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