Tuesday, November 22, 2011

Behold the Boxes!

Dear readers! If you recall, in a blog post not so long ago I introduced you to the wonderful virtual world I now live in.  Now around the same time I wrote that post, some of the GNOME designers and developers (myself included) felt the need for having a UI as an integral part of GNOME that lets users easily manage (create and destroy) virtual machines and at the same time lets them connect to remote machines.

Two of our awesome designers, Jon McCann and Jakub Steiner) started creating design for this UI. We (as in Jon McCann) named it 'Boxes' as its something that deals with..hm.. boxes. At the same time, we (me, Marc-Andre and Christophe) kept working on the foundations for Boxes, mainly in the form of lots of improvements to libvirt, libvirt-glib, libosinfo and spice-gtk.

About less than a month ago we started implementing the design when the design stabilized a bit. The implementation actually started as a "proof of concept" from Marc-Andre over a weekend. The result was already so good that we decided to move it to git.gnome as the bases for Boxes' implementation. While most of the credit for the UI goes to Marc-Andre, I think he will agree that it wouldn't have been so easy to get this started so quickly if we hadn't chosen to write this in Vala.

Since by now you have read a lot of blah blah already, I'll stop boring you more and show you some screenshots of what we have already:

And if that gets you excited, you'd want to see this screencast where I show Boxes in action.

After a few days of tiring work on fixing critical issues in Boxes and its dependencies we finally managed to roll-out our first release. You are more than welcome to try it out already and report any issues you find but please keep in mind that at the moment we require the latest (unstable in many cases) releases of our dependencies to be able to make use of their latest features. If you happen to be a jhbuild user, you are in luck as building boxes is as easy as typing `jhbuild build gnome-boxes`.

Why not virt-manager?


virt-manager is an awesome tool and I myself use it everyday. I am sure other Boxes hackers are using it on daily bases as well. However we must keep in mind that the UI we were looking for in GNOME is not meant for enterprise-level system-administrators who have hundreds of mission-critical virtual-machines on an array of super computers but rather a typical end-user who just wants to connect from his laptop to his work machine(s) and/or try different operating systems. While virt-manager is undoubtedly the best choice for the former, its not at all tailored for the latter.

It should be noted that while we decided not to use virt-manager for the UI, we still are trying our best to share as much code base/efforts with virt-manager as possible in terms of infrastructure, mainly in the form of libvirt, libosinfo, qemu and spice-gtk.

Known issues

Boxes is still in its infancy so you might find a lot of issues in Boxes and its dependencies but one issue that is a big show-stopper at the moment is the breakage of floppy support in recent Qemu. Boxes depends on floppy-support for making automated/express install possible for both Linux and Windows. Fortunately the issue is already fixed in git master of Qemu and its just a matter of releasing and packaging by distributions.

How to help?

Seems many people are already very excited about this little project of ours and I'm hoping this blog entry will attract more contributors so I wanted to point out some things we need help with. If you are interested in UI work, Marc-Andre has written down a TODO for Boxes that you can pick some tasks from. Other than that, we still need a lot of help with two of our main dependencies:

  • libosinfo: This library is our store for information on operating systems and means to detect operating systems from installation media.
  • libvirt-glib: libvirt-glib wraps libvirt to provide a high-level object-oriented API better suited for glib-based applications.
While Boxes is written in Vala, these libraries are completely written in C so if you are a C hacker and want to contribute, these would be good places to start with. While most of the work needed on libosinfo is that of populating its database with information on all kinds of operating systems out there, libvirt-glib still lacks a lot of needed API. One particular part of libvirt-glib that needs the most work and is of highest priority to us is its API to deal with libvirt's configuration XML.

We all love boxes, don't we?

Wednesday, November 16, 2011

libvirt-glib 0.0.1 is out!

The first public release of libvirt-glib is out! libvirt-glib wraps libvirt to provide a high-level object-oriented API better suited for glib-based applications. Daniel wrote nice release notes so I'll save myself some time and quote it for more details:

I am pleased to announce the first release of the libvirt-glib package,
version 0.0.1 is now available from

The packages are GPG signed with

    Key ID: 15104FDF  Daniel P. Berrange 
    Key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

libvirt-glib comprises three distinct libraries:

   - libvirt-glib    - Integrate with the GLib event loop and error handling
   - libvirt-gconfig - Representation of libvirt XML documents as GObjects
   - libvirt-gobject - Mapping of libvirt APIs into the GObject type system

As of this release only the event loop integration and some basic APIs for
managing domains are provided. The representation of XML as GObjects is a
major work item that is just beginning.

The libvirt-gconfig library can be used without linking to the main libvirt.so
library, so it is suitable for consumption by applications which use libvirt
indirectly via AMQP, CIM or another API transport which accepts XML documents.

All the libraries support GObject introspection to enable immediate usage
from any language which can dynamically import objects via introspection.
There are also Vala bindings which are automatically generated from the
introspection data.

NB: While libvirt aims to be API/ABI stable, for the first few releases,
we are *NOT* guaranteeing that libvirt-glib libraries are API/ABI stable.
ABI stability will only be guaranteed once the bulk of the APIs have been
fleshed out and proved in non-trivial application usage. We anticipate
this will be within the next 6 months in order to line up with Fedora 17.

Follow up comments about libvirt-glib should be directed to the regular
libvir-list@redhat.com developmenht list.

Thanks to all the people involved in contributing to this release.