Desktop Virtualization with SPICE

Desktop Virtualization with SPICE
Desktop Virtualization with SPICE
Gerd Hoffmann <kraxel@redhat.com>
KVM Forum, Aug 9th 2010
1
SPICE | Gerd Hoffmann
Agenda
2
●
Overview
●
Devices (vmchannel, QXL)
●
Recent Changes
●
TODO List
●
Use spice: getting started
●
Q+A
●
Demo (?)
SPICE | Gerd Hoffmann
What is SPICE
●
●
3
Simple Protocol for Independent Computing
Environments.
Virtual Desktop Infrastructure.
●
Network Protocol.
●
Guest Devices.
●
Guest Agent.
●
Server implementation.
●
Client application.
●
Created by Qumranet.
●
freedesktop.org project since January '10.
SPICE | Gerd Hoffmann
Network Protocol & Guest Devices
QEMU VM
Guest
vdagent
vmc
virtio-serial
qxl driver
QXL
(cirrus)
standard guest drivers
Keyboard
Mouse
Tablet
AC97
ES1370
(nic)
record
playback
(tunnel)
spice server
main
display
cursor
inputs
spice client
user's machine
4
SPICE | Gerd Hoffmann
(printer)
VM channel device
●
5
communication path between guest and spice client.
●
Uses virtio-serial port nowdays (RHEL-6 & upstream).
●
Used to be a PCI device (RHEL-5).
●
Display information.
●
Mouse events.
●
(Cut+Paste).
SPICE | Gerd Hoffmann
QXL Device
VGA framebuffer (8M)
bar 0
ram
commands,
command data
●
●
cmd rings, control fields (8k)
●
surfaces:
bar 1
vram
6
qxl device info (8k)
bar 3
io
initialization + reset
Surfaces are new in
spice 0.6.
Two device revisions
●
offscreen pixmaps
(textures)
bar 2
rom
Bar 0+1 are 64M by
default.
●
SPICE | Gerd Hoffmann
Rev 1 – spice 0.4
Rev 2 – spice 0.6
(backward compatible)
QXL Rendering
●
QXL device passes commands to the spice server.
●
Spice server:
●
●
Shared library, runs async (thread).
●
Tracks render command dependencies.
●
Sends commands to the client.
●
Can render too (“local rendering”) if needed.
Spice client:
●
7
Processes commands.
SPICE | Gerd Hoffmann
Migration
●
●
VM migration.
●
save/load qxl state.
●
spice server must process all outstanding commands.
spice client migration.
●
●
“switch-host”: just connect to target host.
“seamless”: client connects to target while VM migration
is running.
●
8
minimize switchover latency.
SPICE | Gerd Hoffmann
Recent Changes
●
9
Simplify build.
●
Merge pixman changes upstream.
●
Ditch dependency on patched cairo.
●
Ditch dependency on ffmpeg.
●
New libspice-server API.
●
Fixup data structures (next slide).
●
QXL/Display: Surfaces, WAN compression.
●
Network protocol optimizations.
SPICE | Gerd Hoffmann
Data structure fixups
How it used to work.
How it works today.
Guest: Rect
Guest: QXLRect
qxl parser
spice server: Rect
Sanity checks
are done here
spice server: SpiceRect
network marshaller
code generated
with python.
wire: Rect
wire: (unnamed)
network demarshaller
spice client: Rect
10
spice client: SpiceRect
SPICE | Gerd Hoffmann
TODO List
●
Merge into upstream qemu.
●
11
plan: early in 0.14 devel cycle.
●
Create libspice-client, gtk widget.
●
Portability fixes.
●
More cleanups.
●
Tunnel & Printing.
●
USB forwarding.
SPICE | Gerd Hoffmann
Using spice: getting started
●
12
qemu -spice port=1234,disable-ticketing -vga qxl
-usbdevice tablet
●
spicec -host localhost -p 1234
●
fedora guest: yum install xorg-x11-drv-qxl
●
windows guest: spice-space.org has drivers
SPICE | Gerd Hoffmann
Using spice: with guest agent
●
●
●
qemu: add “-device virtio-serial -device spicevmc”,
remove usb tablet.
fedora guest: yum install vdagent.
●
Tiny daemon feeding uinput, grew from test tool.
●
Long-term the X-Server should handle this.
windows guest:
●
install virtio-serial driver from spice-space.org
●
●
13
Installing driver hangs winxp for me :-(
fetch+unpack vdagent zip, run “vdservice.exe install”.
SPICE | Gerd Hoffmann
Ressources
●
www.spice-space.org
●
●
●
cgit.freedesktop.org
●
spice git repositories.
●
also qemu with spice patches (branches spice.v$nr).
kraxel.fedorapeople.org/spice/, F14, rawhide
●
●
fedora packages.
spice-devel@lists.freedesktop.org
●
14
Wiki, docs & downloads
developer mailing list
SPICE | Gerd Hoffmann
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising