Bug 524047 - virt-viewer outputs nothing if connecting to a non existent VM
Summary: virt-viewer outputs nothing if connecting to a non existent VM
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-viewer
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F12VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-09-17 17:13 UTC by Gianluca Cecchi
Modified: 2010-01-15 13:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-15 13:27:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
debug for not existing VM (5.80 KB, text/plain)
2009-09-17 17:17 UTC, Gianluca Cecchi
no flags Details
debug for existing VM (7.71 KB, text/plain)
2009-09-17 17:18 UTC, Gianluca Cecchi
no flags Details
debug for existing VM after setting vnc connection in qemu.conf (7.72 KB, text/plain)
2009-09-18 10:40 UTC, Gianluca Cecchi
no flags Details

Description Gianluca Cecchi 2009-09-17 17:13:41 UTC
Description of problem:
virt-viewer against not existent VM doesn't give any error message in output.
Using f11 x86_64 with fedora-virt-preview

Version-Release number of selected component (if applicable):
0.2.0-1.fc11.x86_64

How reproducible:
always

Steps to Reproduce:
1. virt-viewer --connect qemu+tls://virtfedbis/system prova3
2. there doesn't exist prova3 VM at all
3. the command returns to prompt but no window at all
  
Actual results:
[root@virtfed /]# virt-viewer --connect qemu+tls://virtfedbis/system prova3
[root@virtfed /]# echo $?
255


Expected results:
error about not existing VM

Additional info:

I don't know if it could impact, but I'm not either able to connect using an existing VM
In this latest case I get, after setting LIBVIRT_DEBUG=1, a window appearing and soon closing but exit code is still 0.
I'm going to attach output.
I expect vnc connection to use certificate set up for connection through virt-manager, but perhpas is not so?

Comment 1 Gianluca Cecchi 2009-09-17 17:17:17 UTC
Created attachment 361530 [details]
debug for not existing VM

Comment 2 Gianluca Cecchi 2009-09-17 17:18:12 UTC
Created attachment 361531 [details]
debug for existing VM

Comment 3 Mark McLoughlin 2009-09-17 17:28:23 UTC
A simpler test is:

  $> virt-viewer this-guest-does-not-exist

No error message

Comment 4 Gianluca Cecchi 2009-09-18 10:39:10 UTC
If I set 
vnc_listen = "0.0.0.0"
inside /etc/libvirt/qemu.conf I get another kind of debug for existing guest.
I'm going to attach it...
Also, on destination host where I try to vnc connect(virtfedbis in my case) I get now this in my /var/log/messages:

Sep 18 12:34:03 virtfedbis libvirtd: 12:34:03.672: error : qemudClientReadBuf:1552 : gnutls_record_recv: A TLS packet with unexpected length was received.

any other settings to be changed?
Does the certificate used for connecting through virt-manager to a remote host is the same as the one to be used for vnc connection or do I have to create another certificate in this case?

Comment 5 Gianluca Cecchi 2009-09-18 10:40:00 UTC
Created attachment 361626 [details]
debug for existing VM after setting vnc connection in qemu.conf

Comment 6 Mark McLoughlin 2009-09-21 13:50:26 UTC
(In reply to comment #4)

> Does the certificate used for connecting through virt-manager to a remote host
> is the same as the one to be used for vnc connection or do I have to create
> another certificate in this case?  

better to ask on fedora-virt for advice

Let's confine this bz to dealing with the issue of virt-viewer failing to show any error messages

Comment 7 Daniel Berrangé 2010-01-15 13:27:24 UTC
THis is addressed in virt-viewer 0.2.1 release which is now in rawhide. Specifically it will

  - Display a message if authentication fails
  - Display a message if authentication is not supported by the server
  - Display a message if the domain does not exist
  - Display a message if unable to connect to libvirt


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