LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2016, 10:04 AM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
QEMU / KVM : Spice Console unable to connect to VM in KVM


Scenario:
In Linux Mint 18 -Cinnamon (Ubuntu 16) host, started CentOS7 VM in KVM via virt-manager.
then I clicked "Open" icon to show virtual machine (graphical) console and details. This would be the display for QEMU / KVM console.

and I got this error in
Quote:
"Error connecting to graphical console:
Error opening spice console, SpiceClientGtk missing"

On VM CentOS 7 side,I found this log messages when I connect using virt-viewer instead of failed connection using Spice console:
Quote:
[root@localhost ~]# cat /var/log/messages | grep avc
...
type=AVC msg=audit(1471235537.999:359): avc: denied { getattr } for pid=2302 comm="spice-vdagent" path="/dev/vport0p2" dev="devtmpfs" ino=432 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u: object_r:virtio_device_t:s0 tclass=chr_file
...
So I fixed the error above related to SELinux.
meaning it no longer shows up in the CentOs7 (VM) log messages

But I still am not able to connect using Spice console and still get this error on Linux Mint host side:
Quote:
"Error connecting to graphical console:
Error opening spice console, SpiceClientGtk missing"
On Linux Mint host side, I also already have the missing SpiceClientGtk:
Quote:
$ apt-file find SpiceClientGtk
gir1.2-spice-client-gtk-2.0: /usr/lib/girepository-1.0/SpiceClientGtk-2.0.typelib
gir1.2-spice-client-gtk-3.0: /usr/lib/girepository-1.0/SpiceClientGtk-3.0.typelib
libspice-client-gtk-2.0-dev: /usr/share/gir-1.0/SpiceClientGtk-2.0.gir
libspice-client-gtk-3.0-dev: /usr/share/gir-1.0/SpiceClientGtk-3.0.gir
python-spice-client-gtk: /usr/lib/python2.7/dist-packages/SpiceClientGtk.so
Note that the setting for display on virt-manager's "virtual hardware details tab" (click "Open" then in new window click "i" icon) for display are:
Display: type = Spice Server, Address = Localhost only, Port=5900 (Auto)
Video: Model= QXL


What is causing this problem on host side?
Thank you.

Last edited by fanoflq; 08-19-2016 at 07:46 AM.
 
Old 08-18-2016, 11:43 PM   #2
lethein
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Rep: Reputation: Disabled
Hi. I had the same error and i fixed it thusly:
sudo apt-get install python-spice-client-gtk
sudo apt-get install virt-viewer
 
Old 08-19-2016, 12:15 AM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
Those packages were already installed.
What is your host Linux distro?
 
Old 08-19-2016, 01:37 AM   #4
lethein
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Rep: Reputation: Disabled
It's Linux Mint 18 xfce. I also have KVM on Fedora 24 and there weren't any error messages there.
 
Old 08-19-2016, 07:45 AM   #5
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@lethein:

I am using Linux Mint 18, Cinnamon.
Spice console is still not working....

Luckily, virt-viewer is working.
Still do not know why ...

If you ever install LM 18 - Cinnamon,
Let me know your result with KVM & Spice console..

Thanks.
 
Old 08-07-2017, 02:47 PM   #6
crtlbreak
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by fanoflq View Post
@lethein:

I am using Linux Mint 18, Cinnamon.
Spice console is still not working....

Luckily, virt-viewer is working.
Still do not know why ...

If you ever install LM 18 - Cinnamon,
Let me know your result with KVM & Spice console..

Thanks.

Code:
sudo apt-get install gir1.2-spice-client-gtk-3.0
 
Old 08-07-2017, 04:33 PM   #7
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 2,981

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
If you install virt-manager from the installation DVD, there is a missing "recommends" package on the DVD. crtlbreak mentions this package above.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
LXer: Implementation Qemu-kvm 0.15.0, SpiceServer and Spice-Gtk-0.7 on Ubuntu 11.10 KVM Server the m LXer Syndicated Linux News 0 08-30-2011 04:40 PM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
LXer: Attempt of qemu-kvm-0.14 patching via Gerds Hoffmann spice/qxl: locking fix for qemu-kvm on LXer Syndicated Linux News 0 03-14-2011 01:20 PM
Kvm/ qemu + spice nixfreakz Linux - Virtualization and Cloud 1 12-17-2009 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration