You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by Josh Thompson <jo...@ncsu.edu> on 2011/09/02 19:11:13 UTC
using spice with kvm
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I started looking in to using spice with kvm. I think it would be a useful
alternative to rdp and to ssh/X11.
Spice runs on the hypervisor and presents a display device to the VM. This
means users connect directly to the hypervisor instead of to the VM. One nice
benefit of this is that you can do a reboot of the VM and remain connected to
it the whole time. There are spice clients for windows and linux. There has
been work done on an OSX client, but it doesn't appear to be as readily
available as the other 2.
Spice is enabled for a VM by setting the 'graphics' element in the xml file:
<graphics type='spice' listen='152.46.20.254' port='5901' passwd='mytest' />
listen and port are the IP address and port on which the spice server should
listen for connections. Instead of specifying the port, "autoport='yes'" can
be used to auto-assign a port. passwd specifies a password to use when
opening the connection. Note that the guest OS may have a separate
login/password.
Only one 'graphics' element may be used in the xml file. So, if spice is
used, vnc cannot be used as far as connecting to the VM through the
hypervisor. vnc could be running directly on the VM.
With the new connection method code, a schema extension was made to the
reservation table to include connectIP and connectport. Populating these will
allow the backend to communicate to the frontend what ip/port combination the
user would use to connect to the reservation.
Note that firewall rules to control connection to the VM would need to be done
on the hypervisor instead of on the guest VM.
For better performance, the 'qxl' video driver can be used. This is done with
<video>
<model type='qxl' vram='16384' heads='1'/>
</video>
There are qxl drivers for both windows and linux guests. Using qxl does
provide a significant performance boost. I haven't been able to determine how
to use more than one head by increasing the 'heads' attribute, but I was able
to have multiple heads by adding more <video> sections. I tested with up
to 4. One interesting thing is that the spice client shows each display in a
separate window. I didn't do any testing of different values for the vram
attribute.
The windows client is a little strange to install. You have to download a zip
file of a set of libraries and extract them. Then, you have to download the
spicec binary and put it in the lib directory from the first zip extraction.
Then, it will run. For 64 bit windows installs, the 32 bit libraries had to
be used because there only seemed to be a 32 bit spicec binary.
- From what I've seen, local drive mapping (sharing your local drives to the VM)
is still in development.
Josh
- --
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University
my GPG/PGP key can be found at pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
iEYEARECAAYFAk5hDjUACgkQV/LQcNdtPQNwPgCfTgWekV5A0zr/k4Tvw/lU5aB6
l3AAmwR0bP4RPRyGlrDy3ABsyDnlnrNZ
=V9S5
-----END PGP SIGNATURE-----