SPICE (Simple Protocol for Independent Computing Environments) is a protocol enabling to remotely connect and manage a virtual machine (VM). SPICE allows the user to:

  • automatically change the VM resolution to fit the screen size;
  • set up the VM output on multiple displays;
  • connect USB devices to the VM;
  • share the clipboard;
  • transfer files using drag-and-drop.

Read more about SPICE in the official documentation.

Setting up access


Enabling access

The ability to connect to a VM via SPICE must be set in the cluster settings and in the settings of the VM itself.

To allow SPICE connections at the cluster level, activate the Enable SPICE connections option in the cluster settings. When activated, the platform will add SPICE ports to the firewall rules on the cluster nodes. SPICE access will appear only for new VMs that will be created after the option is activated.

To allow SPICE access to an existing VM:

  1. Open the VM card: Virtual machines → select the VM → Parameters button.
  2. Enter VNC/SPICE setupSPICE tab → activate the Enable SPICE connections option.
  3. Press Save and restart. The VM will reboot to apply the settings.

To allow SPICE connections to new VMs created based on the configuration, enable the Allow SPICE connections option in the settings of the configurations used.

Note

If you migrate a VM with the Enable SPICE connections option to a cluster where SPICE connections are not allowed, the option will remain enabled, but SPICE connections will be unavailable.

Empowerment with vdagent

Some SPICE features (clipboard sharing, automatic resolution selection, drag-and-drop file transfer) are not available without the vdagent utility. The procedure for installing vdagent on a VM depends on the type of operating system:

  • Linux — connect to the VM via SSH and run the command:

    Debian, Ubuntu

    apt -y install spice-vdagent
    BASH

    CentOS, AlmaLinux

    yum -y install spice-vdagent
    BASH
  • Windows — connect to the VM via VNC, download and run the vdagent installation file.

Disabling access

To disable SPICE access at the cluster level, deactivate the Enable SPICE connections option in the cluster settings. The platform will delete the ports that SPICE uses from the firewall rules on the cluster nodes. On the VM, the SPICE access capability will be disabled after the VM is rebooted. New VMs in the cluster will be created without SPICE connections, regardless of configuration settings.

To disable SPICE access to a specific VM:

  1. Open the VM card: Virtual machines → select the VM.
  2. Enter VNC/SPICE setupSPICE tab → deactivate the Enable SPICE connections option.
  3. Press Save and restart. The VM will reboot to apply the settings.


Connecting to a VM via SPICE


You can connect to a VM:

  • through the platform interface;
  • by means of an external client. For example, Virtual Machine Viewer.

Clipboard sharing and connection of USB devices is only possible when using an external client.

Through the platform interface

To connect to a VM via SPICE, enter Virtual machines → select the VM → menu → SPICE. The VM desktop opens in a new browser tab.

Press SPICE Send Ctrl-Alt-Delete to send the CTRL+ALT+DELETE shortcut to the VM.

Via a client program

To set up a remote connection, the platform installs additional software on the VM — SPICE server. To create the connection, you will need to specify the SPICE server data: IP address, connection port and password. This data is available in the virtual machine card: Virtual machines → select the VM → → Parameters button → VNC/SPICE setupSPICE tab. To avoid entering the server data manually, on this tab you can Download the config file.

Section interface


Connection example for Virtual Machine Viewer:

  1. Download and install the version of Virtual Machine Viewer for your operating system.
  2. To create a connection:
    • manually:
      1. Start the Virtual Machine Viewer.
      2. In the Connection Address field, enter the SPICE server address in the format: spice://<IP address>:<port> and press Connect.
      3. В поле Password введите пароль и нажмите ОК.
    • through the config file — double-click the downloaded config file.
  3. To connect a USB device to the VM:
    1. Insert the USB device into your computer.
    2. In Virtual Machine Viewer, enter File → USB device selection → select the USB device → Close.