|Index|Migrating Spice-based Virtual Machines to VNC
SUSE Linux Enterprise Server 16.0

Migrating Spice-based Virtual Machines to VNC

Publication Date: 30 Jul 2026

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. This migration ensures continued VM console access by replacing the removed Spice protocol with VNC, which is widely supported and actively maintained. 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

Spice support for VMs has been removed beginning with SLES 16. Attempting to start Spice-based VMs on SLES 16 will result in an error. Existing VMs created on SLES 15 SP7 or older that use Spice must be converted to use VNC if run on SLES 16. The virt-xml tool can be used to do this automatically beginning with virt-manager version 5.0.0.

1.1.1 Automatic conversion with virt-xml

To automatically convert a VM using virt-xml (virt-manager 5.0.0 or newer), follow these steps:

  1. First, back up your VM XML if you do not like what virt-xml does.

    > sudo virsh dumpxml VM-NAME > VM-NAME.xml
  2. Run the conversion command:

    > sudo virt-xml VM-NAME --edit --convert-to-vnc qemu-vdagent=on

    Where:

    VM-NAME

    The name of the VM. See virsh list --all on the host.

    --edit

    Edit an existing XML block.

    --convert-to-vnc

    Convert an existing VM to exclusively use a single VNC graphics device.

    qemu-vdagent=on

    Used with --convert-to-vnc to add a qemu-vdagent device if one is not already configured. This is for copy and paste functionality between host and guest on SLES 16.

    See the virt-xml man page for more options and details.

1.1.2 Manual conversion

If you prefer manual conversion, follow the step-by-step guide below.

  1. Shut down your Spice-based VM.

    > sudo virsh shutdown VM-NAME
  2. Save the current XML definition for your Spice-based VM.

    > sudo virsh dumpxml VM-NAME > VM-NAME.xml
  3. Optionally save a copy of the original Spice-based definition if you mess something up.

    > cp VM-NAME.xml VM-NAME-spice.xml
  4. Using your favorite text editor, proceed to edit the XML definition to remove or modify the Spice-based devices as follows.

1.2 Spice elements to remove

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 Spice elements to modify

1.3.1 Graphics and audio

Modify the following elements:

  • 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'/>
  • 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

You could specify more details about the above virtio video device, but libvirt will fill in any missing details.

1.4 Applying the new configuration and starting the VM

  1. Redefine the guest VM based on the newly edited XML definition.

    > sudo virsh undefine VM-NAME
    > sudo virsh define VM-NAME.xml
  2. Start the VNC based guest VM.

    > sudo virsh start VM-NAME

1.5 Restoring copy and paste functionality on VNC

With the absence of Spice on SLES 16, the copy and paste functionality between host and guest was lost. The following steps may be done to restore this capability.

  1. Update the gtk-vnc RPMs on the SLES 16 host to the latest available version. Copying and pasting via VNC requires an updated system. It is not supported by the packages shipped in the initial SLES 16 installation media.

    > sudo zypper update libgtk-vnc-2_0-0 typelib-1_0-GtkVnc-2_0 libgvnc-1_0-0
  2. Enable spice-vdagentd in the running SLES guest VM.

    If not installed, run zypper in spice-vdagent.

    > sudo systemctl enable spice-vdagentd
  3. Shut down the guest VM.

  4. Add the channel device XML below to the guest VM XML definition. This can be done in virt-manager: select Add Hardware › Channel, then set Device Type to QEMU vdagent. Alternatively, add it manually as shown below.

         <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>
  5. Boot the guest VM.

2 For more information

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