11. Folder sharing

The Spice client can share a folder with the remote guest. By default folder sharing is disabled. Use the remote-viewer "File" → "Preferences" menu to enable it. The default shared directory is the XDG Public Share directory (ie ~/Public if you use a regular system). You may specify a different folder with --spice-shared-dir client option.

11.1. Configuration

Using virt-manager. In the hardware details, click on "Add Hardware", then select "Channel". Add a "Spice port" device type with the "org.spice-space.webdav.0" name.

Using libvirt. In order to set up folder sharing, qemu needs to expose a org.spice-space.webdav.0 virtio port, associated with a corresponding Spice port:

<devices>
    <channel type='spiceport'>
        <source channel='org.spice-space.webdav.0'/>
        <target type='virtio' name='org.spice-space.webdav.0'/>
    </channel>
</devices>

Using QEMU. In order to set up folder sharing, qemu needs to expose a org.spice-space.webdav.0 virtio port, associated with a corresponding Spice port:

-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=org.spice-space.webdav.0 -chardev spiceport,name=org.spice-space.webdav.0,id=charchannel1

11.2. Guest configuration

Windows. In a Windows guest, you must then install spice-webdavd service.

Linux. With a Linux guest, you must install the spice-webdavd service (the sources are available at https://git.gnome.org/browse/phodav). The folder will show up in GNOME Files network places (or Nautilus). It can then be mounted and browsed in traditional applications thanks to gvfs-fuse.