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 1201177 - virt-viewer should report an error when use it connecting a non-existing guest
Summary: virt-viewer should report an error when use it connecting a non-existing guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virt Viewer Maint
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-12 08:55 UTC by zhoujunqin
Modified: 2015-07-22 06:32 UTC (History)
8 users (show)

Fixed In Version: virt-viewer-2.0-4.el6
Doc Type: Bug Fix
Doc Text:
No doc needed
Clone Of:
Environment:
Last Closed: 2015-07-22 06:32:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
old-virt-viewer.png (167.94 KB, image/png)
2015-03-12 10:52 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1322 0 normal SHIPPED_LIVE virt-viewer and spice-gtk bug fix and enhancement update 2015-07-20 17:53:14 UTC

Description zhoujunqin 2015-03-12 08:55:33 UTC
Description of problem:
Now virt-viewer support GUI to connect guests, but when use it connecting a non-existing guest, there is no error message showed.

Version-Release number of selected component (if applicable):
virt-viewer-2.0-3.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
Use virt-viewer to connect non-existing guest.(eg:non-existing)
# virt-viewer non-existing


Actual results:
virt-viewer GUI launched but no error message showed to tell user there is no such guest existing on host.

Expected results:
If it's by design, it's better to add related info in debug log.

If not, virt-viewer should report an error when use it connecting a non-existing guest.

Additional info:
1. There is no useful message in debug info:
# virt-viewer non-existing --debug
(virt-viewer:8619): virt-viewer-DEBUG: fullscreen display 0: 0
(virt-viewer:8619): virt-viewer-DEBUG: connecting ...
(virt-viewer:8619): virt-viewer-DEBUG: Opening connection to libvirt with URI <null>
(virt-viewer:8619): virt-viewer-DEBUG: Add handle 7 1 0x113ef10
(virt-viewer:8619): virt-viewer-DEBUG: initial connect
(virt-viewer:8619): virt-viewer-DEBUG: notebook show status 0x10d0000
(virt-viewer:8619): virt-viewer-DEBUG: Dispatch handler 7 1 0x113ef10
(virt-viewer:8619): virt-viewer-DEBUG: Dispatch handler 7 2 0x113ef10
(virt-viewer:8619): virt-viewer-DEBUG: Dispatch handler 7 1 0x113ef10

2. When use remote-viewer connecting such guest, we can get a clear error:
# remote-viewer  non-existing
Cannot determine the connection type from URI

Comment 1 Fabiano Fidêncio 2015-03-12 09:00:36 UTC
(In reply to zhoujunqin from comment #0
> Actual results:
> virt-viewer GUI launched but no error message showed to tell user there is
> no such guest existing on host.

We show a dialog with "Failed to connect: No virtual machine found". Is it not enough?

Comment 2 Fabiano Fidêncio 2015-03-12 09:07:06 UTC
In reply to Fabiano Fidêncio from comment #1)
> (In reply to zhoujunqin from comment #0
> > Actual results:
> > virt-viewer GUI launched but no error message showed to tell user there is
> > no such guest existing on host.
> 
> We show a dialog with "Failed to connect: No virtual machine found". Is it
> not enough?

And here is a video:
https://fidencio.fedorapeople.org/rhbz%231201177.webm

Comment 4 zhoujunqin 2015-03-12 10:51:50 UTC
(In reply to Fabiano Fidêncio from comment #1)
> (In reply to zhoujunqin from comment #0
> > Actual results:
> > virt-viewer GUI launched but no error message showed to tell user there is
> > no such guest existing on host.
> 
> We show a dialog with "Failed to connect: No virtual machine found". Is it
> not enough?

I think it ok.
And you can also refer the error dialog for old virt-viewer version:
such as: virt-viewer-0.6.0-11.el6.x86_64

# virt-viewer  non-existing

A dialog pop up with "Cannot find guest domain non-existing".
After click "OK" button, dialog closed.

Both i think it's ok, thanks.
I will attach screenshot for you: old-virt-viewer.png

Comment 5 zhoujunqin 2015-03-12 10:52:38 UTC
Created attachment 1000918 [details]
old-virt-viewer.png

Comment 6 Fabiano Fidêncio 2015-03-12 11:10:39 UTC
(In reply to zhoujunqin from comment #4)
> (In reply to Fabiano Fidêncio from comment #1)
> > (In reply to zhoujunqin from comment #0
> > > Actual results:
> > > virt-viewer GUI launched but no error message showed to tell user there is
> > > no such guest existing on host.
> > 
> > We show a dialog with "Failed to connect: No virtual machine found". Is it
> > not enough?
> 
> I think it ok.
> And you can also refer the error dialog for old virt-viewer version:
> such as: virt-viewer-0.6.0-11.el6.x86_64
> 
> # virt-viewer  non-existing
> 
> A dialog pop up with "Cannot find guest domain non-existing".
> After click "OK" button, dialog closed.
> 
> Both i think it's ok, thanks.
> I will attach screenshot for you: old-virt-viewer.png

And my screenshot is running the same version 2.0-3.el6 version of virt-viewer.
So, as far as I understand virt-viewer already works in the expected way and this is not a bug.

Comment 7 tingting zheng 2015-03-12 11:23:53 UTC
(In reply to Fabiano Fidêncio from comment #6)

> And my screenshot is running the same version 2.0-3.el6 version of
> virt-viewer.
> So, as far as I understand virt-viewer already works in the expected way and
> this is not a bug.

No,with virt-viewer-2.0-3.el6.x86_64,there is no such error shows which is as decribed in this bug.

Comment 8 Pavel Grunt 2015-03-12 13:38:38 UTC
(In reply to tingting zheng from comment #7)
> (In reply to Fabiano Fidêncio from comment #6)
> 
> > And my screenshot is running the same version 2.0-3.el6 version of
> > virt-viewer.
> > So, as far as I understand virt-viewer already works in the expected way and
> > this is not a bug.
> 
> No,with virt-viewer-2.0-3.el6.x86_64,there is no such error shows which is
> as decribed in this bug.

As Fabiano said we show a dialog.
When there are any running machines - list of running machines is shown
When there are no running machines - "Failed to connect: No virtual machine found"
When libvirtd is not running - "Unable to connect to libvirt with URI: uri."

Do you want to have the same information in the debug log ? Do you want to have this message "virt-viewer-DEBUG: Cannot find guest non-existing" in the debug log ?

> # remote-viewer  non-existing
> Cannot determine the connection type from URI

The error is different because the usage is different. virt-viewer makes connection to libvirt, remote-viewer makes connection based on uri (ie remote-viewer spice://HOST:PORT).

Comment 9 Pavel Grunt 2015-03-12 15:43:17 UTC
As I described in the previous comment an user is informed by a dialog. Closing

Comment 10 tingting zheng 2015-03-13 02:53:42 UTC
(In reply to Pavel Grunt from comment #8)
> (In reply to tingting zheng from comment #7)
> > (In reply to Fabiano Fidêncio from comment #6)
> > 
> > > And my screenshot is running the same version 2.0-3.el6 version of
> > > virt-viewer.
> > > So, as far as I understand virt-viewer already works in the expected way and
> > > this is not a bug.


Misunderstand with the above info.
In my host,there are some running guest,and I use virt-viewer $unexisting to launch an unexisting guest,the dialog about the available guest shows,no such "Failed to connect: No virtual machine found" shows.


> > No,with virt-viewer-2.0-3.el6.x86_64,there is no such error shows which is
> > as decribed in this bug.
> 
> As Fabiano said we show a dialog.
> When there are any running machines - list of running machines is shown
> When there are no running machines - "Failed to connect: No virtual machine
> found"
> When libvirtd is not running - "Unable to connect to libvirt with URI: uri."

So from your comments I understand it is by design from the new version of virt-viewer.

Comment 11 zhoujunqin 2015-03-13 10:28:59 UTC
(In reply to Pavel Grunt from comment #8)
> (In reply to tingting zheng from comment #7)
> > (In reply to Fabiano Fidêncio from comment #6)
> > 
> > > And my screenshot is running the same version 2.0-3.el6 version of
> > > virt-viewer.
> > > So, as far as I understand virt-viewer already works in the expected way and
> > > this is not a bug.
> > 
> > No,with virt-viewer-2.0-3.el6.x86_64,there is no such error shows which is
> > as decribed in this bug.
> 
> As Fabiano said we show a dialog.
> When there are any running machines - list of running machines is shown

Hi Pavel Grunt,
as we talked, i think we'd better have a clear info in debug log to tell user guest "non-existing" isn't existing, and the same list available guests for users is ok, thanks.

So i reopen this bug.

Comment 14 CongDong 2015-03-25 07:56:43 UTC
Reproduce with virt-viewer-2.0-3.el6
Steps:

# virt-viewer sadfasdf --debug
(virt-viewer:4323): virt-viewer-DEBUG: fullscreen display 0: 0
(virt-viewer:4323): virt-viewer-DEBUG: connecting ...
(virt-viewer:4323): virt-viewer-DEBUG: Opening connection to libvirt with URI <null>
(virt-viewer:4323): virt-viewer-DEBUG: Add handle 15 1 0xa447c0
(virt-viewer:4323): virt-viewer-DEBUG: initial connect
(virt-viewer:4323): virt-viewer-DEBUG: notebook show status 0x9dc000
(virt-viewer:4323): virt-viewer-DEBUG: Couldn't get uuid from libvirt
(virt-viewer:4323): virt-viewer-DEBUG: notebook show status 0x9dc000
(virt-viewer:4323): virt-viewer-DEBUG: Cannot get guest state
(virt-viewer:4323): virt-viewer-DEBUG: Remove handle 1 15
(virt-viewer:4323): virt-viewer-DEBUG: Disposing window 0x9b40f0

(virt-viewer:4323): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0


Verify with:virt-viewer-debuginfo-2.0-4.el6

# virt-viewer sadfasdf --debug
(virt-viewer:4633): virt-viewer-DEBUG: connecting ...
(virt-viewer:4633): virt-viewer-DEBUG: Opening connection to libvirt with URI <null>
(virt-viewer:4633): virt-viewer-DEBUG: Add handle 15 1 0x12bd7b0
(virt-viewer:4633): virt-viewer-DEBUG: initial connect
(virt-viewer:4633): virt-viewer-DEBUG: notebook show status 0x1202000
(virt-viewer:4633): virt-viewer-DEBUG: Cannot find guest sadfasdf
(virt-viewer:4633): virt-viewer-DEBUG: Couldn't get uuid from libvirt
(virt-viewer:4633): virt-viewer-DEBUG: notebook show status 0x1202000
(virt-viewer:4633): virt-viewer-DEBUG: Cannot get guest state
(virt-viewer:4633): virt-viewer-DEBUG: Remove handle 1 15
(virt-viewer:4633): virt-viewer-DEBUG: Disposing window 0x122d0f0

(virt-viewer:4633): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0


As the result, "Cannot find guest sadfasdf" in the debug message, so move to VERIFIED

Comment 16 errata-xmlrpc 2015-07-22 06:32:10 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-1322.html


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