SPICE & your desktop Marc-André Lureau, - GUADEC 2011
Outline ● What is Spice? ● Library & applications ● Spice & your desktop ● Roadmap
Spice for dummies ● A recent VDI protocol (~3y old) ● Server & Clients implementation, LGPL ● Origin Qumranet, the KVM company ● Now Red Hat, Inc. ● Hosted on freedesktop.org
Spice is not so much like ● VNC ● RDP ● X11 & NX
Remarkable features ● Para-virtual device, with VGA compatibility ● Migration capabilities ● Video stream (MJPEG), audio-sync ● Multihead support ● JPEG, GLZ & QUIC compression ● CELT audio compression (playback & record) ● Socket per-channel, SSL, SASL ● Agent (copy&paste, resolution etc..)
Why Para-virtual? ● Doesn't emulate real hardware ● Low-level graphical layer ● Upper-level might bring performance more easily ● But is changing rapidly ● X11/Cairo/Wayland, Mesa, Windows GDI/WPF ● Driver level exists similarly for all guests ● Client connected to host (not guest)
Spice Graphic Pipe
spice-gtk ● a GLib library ● a Gtk+ widget library ● GIR & python bindings ● Unix, MacOS, Windows, Android ● Used in virt-manager, vinagre, virt-viewer... ● When a KDE widget & in KDE apps?
import glib, gtk, SpiceClientGtk as spice session = spice.Session() session.set_property("uri", "spice://localhost?port=5900") display = spice.Display(session, 0) session.connect() window = gtk.Window() window.add(display) window.show_all() glib.MainLoop().run()
virt- manager
That's so 90s ● Dual boot, triple-boot, mouhaha... ● Applications, configuration, controls ● Windows in windows ● We can do better and easier integration
Desktop integration ● Copy & Paste (done) drag&drop sometime? ● Resource sharing (ongoing) ● network, USB devices, folders ● Seamless windows, window management ● Document & Applications mining ● Notifications & jumplists ● VM management/configuration (libvirt) ● Xspice (done)
Seamless Windows (1) ● In non-composited rendering: ● Resize guest display to match client ● Make root window / desktop transparent (VBox) ● Cut surface in multiple windows (seamlessrdp) ● Need to know window position & role ● Should synchronize drawing and window events ● Done with global hooks ● VMWare is doing it very well ● Perhaps fake-graphics DC per-app
Seamless Windows (2) ● Composited rendering ● Reduce tricks & artifacts ● Done by DWM on Vista+ ● No public API yet ● But dll hacks to retrieve DirectX surface ● shared with the driver ● Handle window compositing on client side
Documents & Apps Mining ● Use search functionality from guest? ● Need running guest and agent ● Tracker miner to crawl disk? ● Issues: icons/thumbnails.. are better retrieve ● at run time ● Could be done with agent ● (or with guestfish+wine)
Spice future ● Multi-client (ongoing) ● USB sharing (ongoing) ● 3D (Gallium, and WDDM) ● Video pass-through (applets?) ● Network & folder sharing ● Things we have discussed for the desktop ● Others:
Helping ● ● #spice on freenode ● ● Libvirt, guestfish, virt-tools are related projects