Imaginative Realities

Cyber Security and Stray Thoughts



1 February 2023

Enabling SPICE for Proxmox VMs

by Chris

Here I’ve written up a brief post on how to use the SPICE protocol for interacting with your Proxmox Virtual Machines (VMs).

Configuring SPICE

SPICE use cases

While you can use the built in console option for managing the VMs that you create, this option has limits. If you have any sort of desktop requirement for the VM, you’ll want to configure Proxmox’s options for the SPICE protocol. This will give you the ability to copy and paste between your VM guest desktop and the machine you’re working on. If all you’ll ever need is a remote shell then you can get by with Proxmox’s console alone, as you’ll probably just use a SSH connection outside of the Promox management console and SPICE won’t be necessary.

Setup

To use SPICE protocol, first install the virt-viewer package on your non-Proxmox working machine. You’ll have to find this through your package manager.

Next, you’ll have to enable SPICE on each of the VMs you plan to use it on. For each VM, select the VM in the left hand pane of Proxmox’s graphical UI (GUI). Then in the right hand pane select the “Hardware” option. That’ll bring up a bunch of information in the right hand pane. Find “Display”, select it, and click edit at the top. This brings up a drop-down menu with “SPICE” as an option.

Now start the VM in Proxmox by clicking on the start button at the header. Once the VM has booted up, look for the “Console” button in the header. It’ll have a drop down arrow, and now an option for SPICE should be active in dark lettering.

Clicking on that option should open a file picker on your system to select where you’d like to download the SPICE protocol file. Open it, and that should automatically engage the virt-viewer application.

Enabling Copy & Paste

If you’d also like copy and paste functionality between your SPICE enabled console through virt-viewer and the guest VM, you’ll have to take an additional step using the VM’s package manager.

Whether it is apt, rpm or otherwise, look for spice-vdagent package in your package manager and install. You’ll probably have to reboot the guest VM to have the functionality enabled. Then you’ll be able to pass things between your guest VM and working desktop.

tags: