Bug 1623756

Summary: vm's name could not be added into settings file
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-viewerAssignee: Virt Viewer Maint <virt-viewer-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.6CC: dblechte, juzhou, mxie, mzhan, tzheng, victortoso
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1750706 (view as bug list) Environment:
Last Closed: 2019-08-06 13:07:26 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:
Bug Depends On:    
Bug Blocks: 1750706    

Description Xiaodai Wang 2018-08-30 06:29:49 UTC
Description of problem:
vm's name could not be added into settings file

Version-Release number of selected component (if applicable):
virt-viewer-5.0-11.el7.x86_64
How reproducible:
100%

Steps to Reproduce:
1. Add any comments before the vm's uuid(da685339-302e-48ae-8f74-e2988faf1a2e).

[b17b3be1-a881-460b-9b17-f20e1ae8169d]
#monitor-mapping=2:1

[da685339-302e-48ae-8f74-e2988faf1a2e]

2. Open the vm (da685339-302e-48ae-8f74-e2988faf1a2e) by virt-viewer.
3. Check the settings file.

Actual results:
The vm's name is not added before it's uuid.

Expected results:
It's better to improve the logic of adding vm's name into settings file.
so the vm's name still can be added when some normal comments exist.

Additional info:

Comment 1 Victor Toso 2018-08-30 11:58:49 UTC
Patch sent:
https://www.redhat.com/archives/virt-tools-list/2018-August/msg00050.html

It is fair request as we already have code in place to set the guest name there based on uuid.

Comment 3 zhoujunqin 2019-04-29 05:58:55 UTC
I can reproduce this issue with package:
virt-viewer-5.0-11.el7.x86_64

Steps:
1. Add any comments before the vm's uuid(bc5eeeef-e26b-483a-a662-992373f90c5c).
$ cat .config/virt-viewer/settings 
[virt-viewer]
#monitor-mapping=2:1
ask-quit=true

#testcomment
[bc5eeeef-e26b-483a-a662-992373f90c5c]

2. Open the vm (bc5eeeef-e26b-483a-a662-992373f90c5c) by virt-viewer.
$ virt-viewer -c qemu:///system  bc5eeeef-e26b-483a-a662-992373f90c5c
3. Check the settings file.

$ cat .config/virt-viewer/settings 
[virt-viewer]
#monitor-mapping=2:1
ask-quit=true

#testcomment

[bc5eeeef-e26b-483a-a662-992373f90c5c]

Result: VM's name is not added before its uuid.

Then try to verify this bug with new build:
virt-viewer-5.0-13.el7.x86_64

Steps:

1. Add any comments before the vm's uuid(bc5eeeef-e26b-483a-a662-992373f90c5c).
$ cat .config/virt-viewer/settings 
[virt-viewer]
#monitor-mapping=2:1
ask-quit=true

#testcomment
[bc5eeeef-e26b-483a-a662-992373f90c5c]

2. Open the vm (bc5eeeef-e26b-483a-a662-992373f90c5c) by virt-viewer.
$ virt-viewer -c qemu:///system  bc5eeeef-e26b-483a-a662-992373f90c5c
3. Check the settings file.
$ cat .config/virt-viewer/settings 
[virt-viewer]
#monitor-mapping=2:1
ask-quit=true

#testcomment

#rhel7.6
[bc5eeeef-e26b-483a-a662-992373f90c5c]

Result: VM's name is added before its uuid successfully, so I move this bug from ON_QA to VERIFIED.

Comment 5 errata-xmlrpc 2019-08-06 13:07:26 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://access.redhat.com/errata/RHSA-2019:2229