Virtualization
SUSE Linux Enterprise Server 16.0

Virtualization

Publication Date: 05 Mar 2026
WHAT?

Migrating Spice-based virtual machines to VNC is a configuration process that replaces the deprecated Spice graphical console protocol with VNC on SUSE Linux Enterprise Server 16.0 using libvirt and KVM.

WHY?

This migration ensures continued VM console access on SUSE Linux Enterprise Server 16.0 by replacing the removed Spice protocol with VNC, which is widely supported and actively maintained.

EFFORT

It takes approximately 20 minutes to complete this procedure and requires basic knowledge of libvirt, virsh commands and XML configuration files.

GOAL

By the end of this guide, your existing virtual machine will be reconfigured to use VNC instead of Spice and will start successfully on a SUSE Linux Enterprise Server 16.0 host.

1 Deprecation of Spice and Migration to VNC in SUSE Linux Enterprise Server 16

1.1 Overview of Spice Deprecation

Important
Important: Removal of Spice in SUSE Linux 16

Starting with SUSE Linux 16, support for the Spice remote computing protocol for virtual machines (VMs) has been completely removed in favor of VNC, which is a more universally adopted standard. Consequently, any attempt to start a Spice-based VM on an SLES 16 host will fail with an error. All existing VMs that were created on SLES 15 SP7 or earlier and are configured to use Spice for the graphical console must be manually converted to use VNC. Currently, no automated conversion tool is provided, so this process requires manually editing the VM's XML configuration file.

The following procedure outlines the steps to convert a VM from Spice to VNC.

  1. Ensure the virtual machine is completely shut down before making any changes. This prevents any potential data corruption or configuration mismatches.

    > sudo virsh shutdown VM-NAME
  2. Export the current XML configuration of the VM to a file. This file will be edited in the next steps.

    > sudo virsh dumpxml VM-NAME > VM-NAME.xml
  3. Create a backup of the original XML definition. This allows you to restore the original configuration if something goes wrong during the editing process.

    > cp VM-NAME.xml VM-NAME-SPICE.xml
  4. Manually edit the VM's XML configuration file to remove all Spice-related elements and modify others to use VNC. For detailed information, see the subsequent sections.

1.2 Removing Spice-Specific XML Elements

The following XML snippets are specific to the Spice protocol and must be removed from the VM's configuration file. These elements enable features like the Spice agent channel and USB redirection over Spice, which are no longer supported.

    <!-- This channel is for the Spice agent and is no longer needed -->
    <channel type='spicevmc'>
    <target type='virtio' name='com.redhat.spice.0'/>
    <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>

    <!-- These elements enable USB redirection over Spice and must be removed -->
    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='2'/>
    </redirdev>

    <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='3'/>
   </redirdev>

1.3 Modifying XML Elements for VNC Compatibility

After removing the Spice-specific elements, modify several other XML elements to switch the VM from using Spice to VNC for its graphical console and other devices.

1.3.1 Graphics and Audio

The primary change is to switch the graphics display protocol from Spice to VNC. You should also disable the audio device, as Spice-based audio is no longer supported.

Replace the Spice graphics configuration:

<graphics type='spice' autoport='yes' listen='127.0.0.1'>

with the VNC equivalent:

<graphics type='vnc' autoport='yes' listen='127.0.0.1'>

Then, replace the Spice audio configuration:

<audio id='1' type='spice'/>

with:

<audio id='1' type='none'/>

1.3.2 QXL Video Device Conversion for Windows VMs

The QXL video driver is optimized for the Spice protocol and is commonly used in Windows VMs. For better compatibility with VNC, we recommend replacing it with the more generic virtio video driver.

If your VM, especially a Windows guest, uses a QXL video device like this:

     <video>
     <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
     </video>

Replace the entire <video> block with a simpler virtio model definition:

     <video>
     <model type="virtio"/>
     </video>
Note
Note

When you define the VM, libvirt will automatically fill in the necessary default values for the virtio video device, so you don't need to specify details like RAM or bus address.

1.4 Applying the new configuration and starting the VM

After you have finished editing the XML file and saved your changes, you need to make libvirt aware of the new configuration. This is done by first undefining the VM, which removes its old configuration from libvirt, and then defining it again using the modified XML file.

  1. Undefine the existing VM configuration and then define it again with the modified XML file:

    > sudo virsh undefine <vm_name>
    > sudo virsh define <vm_name>.xml
  2. Start the VM, which will be using VNC for its graphical console.

    > sudo virsh start <vm_name>

1.5 Restoring copy-paste functionality

A common feature available with Spice is copy-paste functionality between the host and the guest VM, which is handled by the Spice agent. After migrating to VNC, this functionality will be lost. However, you can restore it by using the QEMU guest agent.

  1. Ensure you have updated gtk-vnc packages on your SLES 16 host. The versions shipped with the initial release of SLES 16 may not have support for copy-paste over VNC.

  2. Inside the guest VM, ensure the QEMU guest agent is installed and the corresponding service is enabled to start on boot.

    > sudo systemctl enable qemu-guest-agent
  3. Add a new channel definition to the VM's XML configuration. This channel allows communication with the QEMU guest agent for features like copy-paste.

         <channel type="qemu-vdagent">
         <source>
         <clipboard copypaste="yes"/>
         </source>
         <target type="virtio" name="com.redhat.spice.0"/>
         <address type="virtio-serial" controller="0" bus="0" port="1"/>
         </channel>
  4. Shut down and restart the VM for the changes to take effect.

2 For more information

For further steps in virtualization, refer to the following sources: