SPICE: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:Screen-enable-spice.png|thumb]] [[Image:Screen-start-spice-viewer.png|thumb]]  
[[Image:Screen-enable-spice.png|thumb|Enable SPICE]] [[Image:Screen-start-spice-viewer.png|thumb|Start SPICE console]] [[File:Spice Add USB Device.png|thumb|Add USB Device for passthrough from the client]] [[File:Audio Devices.png|thumb|Add an audio device to a VM]]  
 


== Introduction ==
== Introduction ==


[http://www.spice-space.org SPICE] (Simple Protocol for Independent Computing Environments) is an open remote computing solution built for virtual environments which allows users to view a computing "desktop" environment. The integrating of Spice into Proxmox VE provides a solution for interaction with virtualized desktop devices, like keyboard, mouse, audio and video. Interaction between front-end and back-end is done using Virtual Device Interfaces (VDI).  
[http://www.spice-space.org SPICE] (Simple Protocol for Independent Computing Environments) is an open remote computing solution built for virtual environments which allows users to view a computing "desktop" environment. The integrating of Spice into Proxmox VE provides a solution for interaction with virtualized desktop devices, like keyboard, mouse, audio and video. Interaction between front-end and back-end is done using Virtual Device Interfaces (VDI).  


Spice achieves a user experience similar to an interaction with a local machine, while trying to offload most of the intensive CPU and GPU tasks to the client. Spice is suitable for both LAN and WAN usage, without compromising on the user experience.  
Spice achieves a user experience similar to an interaction with a local machine. It is suitable for both LAN and WAN usage, without compromising on the user experience.  


Using Spice on Proxmox VE is easy and secure. It is integrated in the cluster environment, the user- and authentication system - and of cource, all traffic is fully encrypted.  
Using Spice on Proxmox VE is easy and secure. It is integrated in the cluster environment, the user- and authentication system - and of course, all traffic is fully encrypted.  


Proxmox VE 3.1 introduced Spice as a technology preview.  
Spice was first introduced with Proxmox VE 3.1.


The VNC console is still available and the default.
== Requirements for SPICE ==


== Requisites for SPICE ==
In order to use Spice you need the following:
 
In order to use Spice you need the following:  


* Spice client on your desktop OS  
* Spice client on your desktop OS  
Line 24: Line 23:
*Windows: virt-viewer 0.5.6 or higher, http://www.spice-space.org/download.html  
*Windows: virt-viewer 0.5.6 or higher, http://www.spice-space.org/download.html  
*Linux: virt-viewer 0.5.6 or higher
*Linux: virt-viewer 0.5.6 or higher
*OS X (not yet working as expected): virt-viewer 0.5.7 or higher, http://www.spice-space.org/page/OSX_Client
*OS X (not yet working as expected): virt-viewer 0.5.7 or higher, https://www.spice-space.org/osx-client.html


== Enable SPICE for a VM ==
== Enable SPICE for a VM ==


By default, Spice in not enabled and the traditional VNC based console is used. In order to enable Spice, just select SPICE as virtual "Graphic card" - as shown in the screenshot on top of this page.  
Spice is not enabled by default. To enable it set the Display in the Hardware section of the VM to Spice (shown in the screenshot at the top). Increase the memory if you intend to use SPICE with high resolutions. 32 MiB is plenty for 4K resolutions.
 
==== Caution ====
Before changing the Display setting to SPICE check the following section. You may need to install QXL/SPICE drivers depending on the guest OS.


== OS specific settings for VM ==
== OS specific settings for VM ==
Line 36: Line 38:
==== Windows 7/8/10 and Windows 2012/2016 ====
==== Windows 7/8/10 and Windows 2012/2016 ====


Fully supported, just install windows spice guest tools 0.132 or higher (spice-guest-tools-0.132.exe or higher)  
Fully supported. Before you switch the Display to SPICE install the Windows SPICE guest tools 0.132 or higher (spice-guest-tools-0.132.exe or higher)


*http://www.spice-space.org/download.html<br>
*http://www.spice-space.org/download.html<br>
Line 42: Line 44:
=== Linux ===
=== Linux ===


All linux distributions released after 2011 have the necessary qxl driver included as a part of the Xorg package.
All Linux distributions released after 2011 have the necessary qxl driver included as a part of the Xorg package.


== Start your SPICE session ==
== Start your SPICE session ==
When you click on Spice console button, a connection config file is downloaded. You need to configure your browser to always open this configuration file and associate it with remote-viewer.
A Spice session can be started by clicking directly on the Console button or by opening the Console sub menu and selecting Spice explicitly. This will trigger the download of the connection config file.  
 
Open this file with Remote Viewer to start the session.


The association is automatic for Chrome and Internet Explorer (they use the mime type association from the OS).
The association is automatic for Chrome and Internet Explorer (they use the mime type association from the OS).
Line 52: Line 56:
== Using client USB devices ==
== Using client USB devices ==


USB devices from the desktop client can be mapped into the VM, using the virt-viewer GUI. Please note, the Windows version of virt-viewer does not support this. You need to use a virt-viewer on a Linux Desktop.  
You can pass USB devices from the client into the VM. Add a USB device of the type ''Spice Port'' in the Hardware section of the VM.


* enable one or more Spice USB devices in your VM config.  
Old methods of editing the config file directly are not necessary anymore with recent versions of Proxmox VE.
** usb0: spice
 
** usb1: spice
==== Caution ====
** ...
 
* The Windows version of the virt-viewer does not support it.


== Using Audio ==
== Using Audio ==
In order to got audio/sound, you need to add a virtual sound-card into your VM config. Just add the following line to your VM config (/etc/pve/qemu-server/XXX.conf, XXX being the VM ID):
args: -device AC97,addr=0x18


or
Audio devices can be added in the Hardware section of the VM. Three audio devices are supported:
args: -device intel-hda,id=sound5,bus=pci.0,addr=0x18 -device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 -device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1


In upcoming releases, adding audio devices can be done via GUI.
* ich9-intel-hda: emulates Intel HDA Audio on ICH9 chipsets
* intel-hda: emulates Intel HDA Audio on ICH6 chipsets. Use if the ICH9 one does not work properly
* AC97: useful for older OS`s like Windows XP


== Trouble Shooting ==
Manually editing the config file of the VM is not necessary with recent versions of Proxmox VE.


== SPICE Enhancements ==
SPICE Enhancements are optional features that can improve the remote viewer experience.
They can be enabled in the Options panel of a VM.
Two enhancements are currently available:
* Foldersharing
* Videostreaming
Foldersharing enables you to share a local folder with the VM you are connecting to. The "spice-webdavd" daemon needs to be installed in the VM.
'''HINT:''' only the Linux version of Virt-viewer (remote-viewer) supports this.
Videostreaming will encode fast refreshing areas in a lossy video stream.  A general recommendation cannot be given but depending on your situation this can greatly improve the performance.
More information can be found in the reference manual by clicking the "Help" button in the dialog to enable the enhancements.
== Troubleshooting ==
==== Can't start Spice session ====
If you can't start a Spice session from the PVE Web gui, you can try the following shell script:
If you can't start a Spice session from the PVE Web gui, you can try the following shell script:
https://git.proxmox.com/?p=pve-manager.git;a=blob_plain;f=spice-example-sh;hb=HEAD
https://git.proxmox.com/?p=pve-manager.git;a=blob_plain;f=spice-example-sh;hb=HEAD
==== Guest resolution does not resize to Remote Viewer window ====
Make sure the ''spice-vdagent'' service is installed and running in the VM.
If the guest stops resizing once you go higher than a certain size it is possible that the video memory is not enough. Increase the Memory settings of the Display in the Hardware section of the VM by a few MiB. For the changes to take effect you have to shutdown the VM and do a clean start.
== Alternatives ==
Depending on your situation SPICE might not be the best solution.
Alternatives are:
* RDP (Remote Desktop Protocol) for Windows Guests
* [https://wiki.x2go.org/ X2GO] for Linux Guests


== Video Tutorials ==
== Video Tutorials ==
Line 78: Line 116:


[[Category:HOWTO]]
[[Category:HOWTO]]
[[Category:Staging]]

Latest revision as of 09:09, 29 December 2019

Enable SPICE
Start SPICE console
Add USB Device for passthrough from the client
Add an audio device to a VM


Introduction

SPICE (Simple Protocol for Independent Computing Environments) is an open remote computing solution built for virtual environments which allows users to view a computing "desktop" environment. The integrating of Spice into Proxmox VE provides a solution for interaction with virtualized desktop devices, like keyboard, mouse, audio and video. Interaction between front-end and back-end is done using Virtual Device Interfaces (VDI).

Spice achieves a user experience similar to an interaction with a local machine. It is suitable for both LAN and WAN usage, without compromising on the user experience.

Using Spice on Proxmox VE is easy and secure. It is integrated in the cluster environment, the user- and authentication system - and of course, all traffic is fully encrypted.

Spice was first introduced with Proxmox VE 3.1.

Requirements for SPICE

In order to use Spice you need the following:

  • Spice client on your desktop OS
  • Spice drivers inside your VM (VirtIO, QXL Graphic card drivers)

SPICE client

Enable SPICE for a VM

Spice is not enabled by default. To enable it set the Display in the Hardware section of the VM to Spice (shown in the screenshot at the top). Increase the memory if you intend to use SPICE with high resolutions. 32 MiB is plenty for 4K resolutions.

Caution

Before changing the Display setting to SPICE check the following section. You may need to install QXL/SPICE drivers depending on the guest OS.

OS specific settings for VM

Windows

Windows 7/8/10 and Windows 2012/2016

Fully supported. Before you switch the Display to SPICE install the Windows SPICE guest tools 0.132 or higher (spice-guest-tools-0.132.exe or higher)

Linux

All Linux distributions released after 2011 have the necessary qxl driver included as a part of the Xorg package.

Start your SPICE session

A Spice session can be started by clicking directly on the Console button or by opening the Console sub menu and selecting Spice explicitly. This will trigger the download of the connection config file.

Open this file with Remote Viewer to start the session.

The association is automatic for Chrome and Internet Explorer (they use the mime type association from the OS). For Firefox, the association must be done manually, as Firefox has his own internal mime type association (See Options/Applications).

Using client USB devices

You can pass USB devices from the client into the VM. Add a USB device of the type Spice Port in the Hardware section of the VM.

Old methods of editing the config file directly are not necessary anymore with recent versions of Proxmox VE.

Caution

  • The Windows version of the virt-viewer does not support it.

Using Audio

Audio devices can be added in the Hardware section of the VM. Three audio devices are supported:

  • ich9-intel-hda: emulates Intel HDA Audio on ICH9 chipsets
  • intel-hda: emulates Intel HDA Audio on ICH6 chipsets. Use if the ICH9 one does not work properly
  • AC97: useful for older OS`s like Windows XP

Manually editing the config file of the VM is not necessary with recent versions of Proxmox VE.

SPICE Enhancements

SPICE Enhancements are optional features that can improve the remote viewer experience. They can be enabled in the Options panel of a VM.

Two enhancements are currently available:

  • Foldersharing
  • Videostreaming

Foldersharing enables you to share a local folder with the VM you are connecting to. The "spice-webdavd" daemon needs to be installed in the VM.

HINT: only the Linux version of Virt-viewer (remote-viewer) supports this.

Videostreaming will encode fast refreshing areas in a lossy video stream. A general recommendation cannot be given but depending on your situation this can greatly improve the performance.

More information can be found in the reference manual by clicking the "Help" button in the dialog to enable the enhancements.


Troubleshooting

Can't start Spice session

If you can't start a Spice session from the PVE Web gui, you can try the following shell script: https://git.proxmox.com/?p=pve-manager.git;a=blob_plain;f=spice-example-sh;hb=HEAD

Guest resolution does not resize to Remote Viewer window

Make sure the spice-vdagent service is installed and running in the VM.

If the guest stops resizing once you go higher than a certain size it is possible that the video memory is not enough. Increase the Memory settings of the Display in the Hardware section of the VM by a few MiB. For the changes to take effect you have to shutdown the VM and do a clean start.

Alternatives

Depending on your situation SPICE might not be the best solution. Alternatives are:

  • RDP (Remote Desktop Protocol) for Windows Guests
  • X2GO for Linux Guests

Video Tutorials