Bug 524047

Summary: virt-viewer outputs nothing if connecting to a non existent VM
Product: [Fedora] Fedora Reporter: Gianluca Cecchi <gianluca.cecchi>
Component: virt-viewerAssignee: Daniel Berrangé <berrange>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, markmc, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-15 13:27:24 UTC Type: ---
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: 498969    
Attachments:
Description Flags
debug for not existing VM
none
debug for existing VM
none
debug for existing VM after setting vnc connection in qemu.conf none

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