Wednesday, March 19, 2014

Boxes 3.12

I just rolled out Boxes 3.11.92, which is going to become 3.12 in a week. Apart from lots of fixes and minor improvements like addition of keyboard shortcuts for improved accessibility for example, there are some note worthy changes against 3.10:
  • Dropped use of clutter and clutter-gtk: While it was a good idea to mix gtk+ and clutter at the beginning of the project to make most of the animations and transparency controls possible, Gtk+ gained new API over last few years to make most of what Boxes needed, possible. So I decided to attempt to remove clutter* from the picture and I'm glad to report that my attempt was a success. This means:

    • Less animations: Some of the animations we had are still not possible with Gtk+ (at least not in any easy/nice way) so they had to be dropped but they are nothing really essential to how Boxes work and were only good for impressing first time users. I'm talking about box thumbnail flying around the window for transitions between different UI states.

    • More animations: Making use of new Gtk+ API, we gained some nice animations for UI transitions that nicely makes up for the dropped animations. Here is a video of Boxes 3.12, where you can see all these animations.



    • Simplified code: Removal of clutter actors from widget hierarchy also made it easier to simplify the hierarchy quite a bit. I also took the liberty of moving most of the UI setup to UI description files separate from rest of the code. So overall the code is a lot cleaner and therefore much easier to maintain, hence removed clutter even literally.

  • Ability to easily import existing VMs from system libvirt: Many people have been using virt-manager for years and while they'd want to use Boxes, them not being able to easily use their existing VMs wasn't  encouraging them to switch. Now we've fixed that.



  • NAT networking: Since the very beginning of the project, one complain we kept getting was that the default network setup by Boxes in VMs was slow and VM was unreachable even from the host machine. This has finally been fixed by Boxes now setting up a NAT network in new VMs using the special bridge network setup by libvirt. This means that all VMs are on the same private (to host) network and therefore VMs and host can directly communicate with each other. Its also much faster than 'user-mode' networking we've been using till now.
Thats basically it for this release! Now some features I'd want to add in 3.14:

  • Import and export of VMs. Doing this properly will involve creation of a new library that deals with OVF. I'd like it in a library because there is at least one project (apart from Boxes) that can make use of it: gnome-continuous. Boxes already allow you to import the qcow2 images gnome-continuous produces but since this image does not provide information about the VM itself, you can very easily find yourself creating a broken VM with them. QXL breaking every other release and gnome-continuous tracking git master of that does not help at all here /rant. So if continuous would provide OVF files instead of raw disk images, it can tell Boxes to use 'vga' rather than 'qxl' whenever QXL is known to be broken.

  • Support for express installation for many other OSs/distros, especially Debian/Ubuntu. The idea has been proposed for SoC and there is already one student that has applied for it.

  • Support multiple monitors in VMs.

  • Snapshots: You went for an OS update and it completely destroyed your VM, what do you do? Snapshots will make it possible to save the VM for you before you go for that OS update so that if things go south, you have a way to easily recover. What if you installed multiple updates at different times and you don't know which update caused the problem. Snapshots will also make it possible to save multiple checkpoints of your VM so you can go back to any of them and then use the one that was not broken. Pretty cool if you think about it and makes you wish you could do the same with life. :)

    This idea has also been proposed for SoC and there are two students who have already applied for it.

  • Downloading of ISOs and images (and also VMs, after we have the VM import feature in place). Currently you can't give Boxes URL of a remote ISO or image and expect to be able to handle that. We need to fix that but automatically downloading the ISO/image for you. To make it even better, would be nice to:

    • Autocomplete URLs while you type it in the wizard using the list of known URLs in libosinfo database. E.g you type "Fed" and URLs of all Fedora releases get proposed to you, you keep typing till "Fedora 19", you already have a URL to hit enter on.

    • Provide a way to add entries to the ready menu you get in the wizard. This will allow us to provide 'a few clicks' ™ way for user to try latest GNOME unstable releases and distros to do something similar for bleeding-edge/development snapshots of their distro.

    This has also been proposed as second part of the "Automated installation" SoC project I mentioned above.

10 comments:

Mattias Bengtsson said...

Great work Zeeshan! I used Boxes a lot when testing web code with different versions of Internet Explorer. It was really simple to use but the two features I missed the most was snapshots, export/import and easy network setup. This should be a great release for me. :)

Since I currently work on embedded software, any chance of emulating an ARM platform also at some point? :)

Mattias Bengtsson said...

Great work Zeeshan! I used Boxes a lot when testing web code with different versions of Internet Explorer. It was really simple to use but the two features I missed the most was snapshots, export/import and easy network setup. This should be a great release for me. :)

Since I currently work on embedded software, any chance of emulating an ARM platform also at some point? :)

zeenix said...

Mattias, Thanks! There has been a bug about ARM support since the very beginning of the project but nobody has stepped-up to the task. I might have a look at that at some point but its open source so if you want/need something, you make it so. :)

Mattias Bengtsson said...

That is very true. :)

James Moger said...

Removal of Clutter makes things less cluttered. Hehe. Looks great!

Dave Crossland said...

So glad to hear snap shots are coming, as that stopped me from using boxes

garegin said...

what hypervisor does Boxes use? Is there like a default one or is it completely pluggable like in virt-manager (KVM, XEN, LXC)?

zeenix said...

garegin, Boxes uses libvirt, just like virt-manager but currently we explicitly ask for qemu and uses qemu-img binary for converting images.

garegin said...

so, it uses KVM or just bare qemu? is qemu even a hypervisor? sorry, i'm a linux virtualization noob.

zeenix said...

KVM when its available. Don't worry, after working on this for years I still can't remember what exactly is hypervisor. :)