Summary: | save-image-edit will make spice or vnc passwd disappear when we edit something | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | dyuan, jtomko, mprivozn, mzhan, pkrempa, rbalakri, zhwang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.13-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 06:08:23 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: |
Description
Luyao Huang
2015-01-20 06:11:11 UTC
A patch mentioning this bug has been sent upstream: https://www.redhat.com/archives/libvir-list/2015-January/msg00685.html I've just pushed the patch upstream: commit f76df311e8896957b92d0e0c5251ee3e6754d9ac Author: Luyao Huang <lhuang> AuthorDate: Tue Jan 20 17:04:41 2015 +0800 Commit: Michal Privoznik <mprivozn> CommitDate: Wed Jan 28 16:56:34 2015 +0100 qemu: fix cannot set graphic passwd via qemuDomainSaveImageDefineXML https://bugzilla.redhat.com/show_bug.cgi?id=1183890 When we try to update a xml to a image file, we will clear the graphics passwd settings, because we do not pass VIR_DOMAIN_XML_SECURE to qemuDomainDefCopy, qemuDomainDefFormatBuf won't format the passwd. Add VIR_DOMAIN_XML_SECURE flag when we call qemuDomainDefCopy in qemuDomainSaveImageUpdateDef. Signed-off-by: Luyao Huang <lhuang> v1.2.12-30-gf76df31 I can produce this bug with build libvirt-1.2.8-13.el7.x86_64 Verify with build libvirt-1.2.15-2.el7.x86_64 Steps:1 1. edit guest with spice passwd # virsh edit vm2 ... <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='aaaaaa'> <listen type='address' address='0.0.0.0'/> </graphics> ... 2. start guest and dumpxml --security-info, to check passwd works # virsh dumpxml vm2 --security-info ... <graphics type='spice' port='5900' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='aaaaaa'> <listen type='address' address='0.0.0.0'/> </graphics> ... 3.save guest # virsh save vm2 vm2.save Domain vm2 saved to vm2.save 4. edit save file, modify some place # virsh save-image-edit vm2.save State file vm2.save edited. 5. dumpxml save file, check passwd still exist # virsh save-image-dumpxml vm2.save --security-info ... <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='aaaaaa'> <listen type='address' address='0.0.0.0'/> </graphics> ... 6. test graphics type=vnc, reproduce step 1-5, get the same result ... <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us' passwd='cccccc'> <listen type='address' address='0.0.0.0'/> </graphics> ... move 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-2202.html |