Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1687206 - [machines] "Launch remove viewer" not opening in virt-viewer
Summary: [machines] "Launch remove viewer" not opening in virt-viewer
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: cockpit
Version: 28
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Katerina Koukiou
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-10 22:51 UTC by Terry Bowling
Modified: 2019-03-11 12:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)
firefox-serial-console.png (deleted)
2019-03-11 12:01 UTC, Terry Bowling
no flags Details
virt-mgr-Display-Spice.png (deleted)
2019-03-11 12:03 UTC, Terry Bowling
no flags Details
virt-mgr-Channel-spice.png (deleted)
2019-03-11 12:03 UTC, Terry Bowling
no flags Details

Description Terry Bowling 2019-03-10 22:51:28 UTC
Description of problem:

cockpit-machines "Launch remove viewer" not opening in virt-viewer

Version-Release number of selected component (if applicable):

$ yum  list cockpit-machines virt-viewer
Last metadata expiration check: 10 days, 7:53:59 ago on Mon 25 Feb 2019 09:53:10 AM EST.
Installed Packages
cockpit-machines.noarch                               189-1.fc29                                @updates
virt-viewer.x86_64                                    7.0-1.fc29                                @System 

How reproducible:

Steps to Reproduce:
1.  create and launch vm with proper agents installed
2.  install cockpit-machines and virt-viewer
3.  Log into Cockpit, start the vm.
4.  Click Consoles tab of the vm, select Graphics Console in Desktop Viewer
5.  Click Launch Remote Viewer

Actual results:

It downloads a file called "download"

Expected results:

It should download a filed with the appropriate extension and auto launch virt-viewer connecting me to the VM.  Below are the contents of the file it downloaded.

$ cat download 


Additional info:

Comment 1 Terry Bowling 2019-03-10 22:52:56 UTC
According to the text on the cockpit console screen:

"Clicking "Launch Remote Viewer" will download a .vv file and launch Remote Viewer."  So maybe the file is simply missing the ".vv" extension?

Comment 2 Katerina Koukiou 2019-03-11 08:55:38 UTC
Terry, I don't seem to be able to reproduce the bug. I am running fedora 29, same version of virt-viewer/cockpit-machines as you, and when I click on the Graphical VNC console entry, I  get the prompt to either download the file or open it with the virt-viewer.

In fact in the dialog I even see that the file is recognized as 'Virt-Viewer connection file', which makes sense according to the man page.
See `man remote-viewer` and search for CONNECTION FILE.

I guess if you choose explicitly the virt-viewer app to open this file with, you get desired behavior? It's just that it just not get chosen by default?

Comment 3 Martin Pitt 2019-03-11 09:15:58 UTC
Could this be a Firefox vs. Chromium issue? These behave *very* differently with this.

Comment 4 Katerina Koukiou 2019-03-11 09:50:00 UTC
Indeed chromium but default just download the file. Then by clicking on it you can choose if you want to launch  virt-viewer with this file config. @Terry does this bahavior is what you see?

Comment 5 Terry Bowling 2019-03-11 12:00:36 UTC
This is failing for me with both Firefox and Google Chrome Stable when accessing a RHEL 8 VM using the internal Snapshot 6 .

Guest has the following agents installed
$ rpm -q qemu-guest-agent spice-vdagent

My virt host and viewer environment has these spice client packages installed:
$ rpm -qa |grep spice

Am I missing a client viewer or or browser plugin?

  - serial console shows black terminal screen, says connect to domain <guest hostname> an states what the escape character is, but does not give a console prompt to interact with.  Image attached.
  - launching graphical remote viewer gives error "Failed to connect: No running virtual machine found"

Google Chrome Stable
  - serial console gives same behavior as FF.
  - launching graphical remote viewer downloads a file called "download" as explained before.  It does not include the ".vv" extension as explained in the info on the cockpit screen.  When I click on the download menu, there is no option to "Open" or to choose the application it opens with, presumably because there is no extension or mime type provided with this file.

With Chrome*, it does not have a mime-type editor but rather uses xdg-open from xdg-utils.  There is a xdg-mime tool to query the handling defined, however I cannot get it to work.  It appears it is not setting this download file up with the appropriate mime handling.

Am I missing a package that needs to be installed?

Comment 6 Terry Bowling 2019-03-11 12:01:39 UTC
Created attachment 1542833 [details]

Comment 7 Terry Bowling 2019-03-11 12:03:10 UTC
Created attachment 1542834 [details]

Image from virt-manager show how the default spice configuration was setup.  Virt-manager app can open a working spice console just fine to this guest.

Comment 8 Terry Bowling 2019-03-11 12:03:35 UTC
Created attachment 1542835 [details]

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