Spice has following benefits, compared to VNC as protocol to access the guest VM console.
Copy & Paste of text and images between the guest and client machine
Automatic adjustment of resolution when the client screen changes - e.g. if you make the Spice console full screen the guest resolution will adjust to match it rather than letterboxing.
Better mouse integration - The mouse can be captured and released without needing to click inside the console or press keys to release it. The performance of mouse movement is also improved.
Overall works faster and smoother compared to VNC
Installation
Assuming you have installed Openstack controller and compute (the tests were done on Ocata version,but should work on newer too).
Controller node:
Install following packages from your distro repository:
nova-spiceproxy spice-html5
Spice-html5 is the Spice javascript client, that will appear in the Dashboard of the Controller UI. Nova spiceproxy is simiar to the novnc proxy- will proxy the spice session to the compute.
[spice]
enabled = True
html5proxy_host = 0.0.0.0 #address on which spice proxy will accept connections
html5proxy_port = 6082 #port on which spice proxy will accept connections
keymap = en-us
Compute node, /etc/nova/nova.conf:
[vnc]
enabled = False
...
[spice]
enabled = True
html5proxy_base_url = https://10.3.73.94:6082/spice_auto.html # The URL on the controller ,where the spice console will be opened
keymap = en-us
server_listen = 0.0.0.0 # Address of the Compute, where the SPICE server running on the instances should listen
server_proxyclient_address = $my_ip #The address used by nova-spicehtml5proxy client,on controller, to connect to instance console.
Usage
Once all relevant nova services are (re)started and VMs launched, the horizon will show spice console.
Small demo can be seen here.
Copy and paste between guest and host terminal is possible, but it is not supported on the spice-html5 client (more info here)
Other clients, such as remote-viewer are supporting shared clipboard.
It can be run like that:
remote-viewer spice://10.3.73.94:5900
Where the IP address is of the compute and the port is the SPICE server port, as libvirt has it configured.
The port can be seen on the compute:
[root@embeddedboxpc500069kkvd2 nova]# virsh list
Id Name State
----------------------------------------------------
10 instance-0000000a running