For our fourth guest post highlighting veteran Google Summer of Code organizations from this year’s program the organization administrators from QEMU discuss their student’s projects below.
QEMU is an open source machine emulator and virtualizer that can run programs written for one type of machine on another using dynamic translation, like ARM Linux on x86 Windows. Hypervisors such as KVM and Xen also use QEMU to run guest code at native speed, like a Debian Linux guest on a Fedora Linux host.
QEMU.org has participated in Google Summer of Code for three years and has helped over 15 talented students contribute to open source. This year we are also acting as an umbrella organization for the KVM Linux kernel module (http://www.linux-kvm.org/) and the libvirt virtualization API (http://libvirt.org/).
This summer we worked with nine students, we describe two of the projects below.
Integrated copy/paste – Students: Pallav Agrawal and Ozan Caglayan
Up until now QEMU has not supported easy copy/paste between the guest and the host (for example, copying text from a web browser in the guest and pasting it into a text editor on the host).
In order to make this work there are a couple of requirements:
1) Provide a way for a guest’s application window to transmit the contents of its clipboard to the host interface.
2) Provide a way for the host interface to transmit the contents of its clipboard to the guest.
Both sides of the problem require considerable work so we had two students, Pallav Agrawal and Ozan Caglayan, working on each end of the equation.
After completing the initial prototype, Ozan saw the potential for some major performance issues transferring potentially large clipboards on every ‘copy’ event, and reached out to another member of the QEMU community with experience working on clipboard syncing on another project called SPICE. Together they worked out a much more efficient API. Unfortunately, late in the project we ran into implementation issues with the new API that seemed to require some invasive modifications to core QEMU code. We weren’t able to work out a feasible solution in time to complete integration of Ozan and Pallav’s work and submission of their code upstream before the end of Google Summer of Code 2013.
Both Ozan and Pallav have shown interest in carrying on their work however, and we plan to pick up the task of getting their code merged in the near future. It was a great experience working with both of them, and we look forward to working with them more in the future.
Introduce API to query IP addresses for given domain – Student: Nehal J. Wani
One of the most desired APIs in libvirt that still hasn’t been implemented is to get/guess a list of IP addresses assigned to a domain. This project’s aim is to implement the API. There are several ways to get the addresses information: asking a guest agent, snooping domain traffic, parsing the dnsmasq lease file, etc.
Nehal implemented a new ‘domifaddr’ command and API to query IP addresses used by a domain. These patches contain support for getting IP addresses from the guest agent. The API is designed to allow adding more methods to query IP addresses in the future. Nehal did just that with another patch series that finds IP addresses by parsing the DHCP leases file.
Both patch series are currently undergoing community code review and we hope to include them in the next libvirt release.
QEMU.org has had a terrific summer and all of our students are making significant progress. Our project offers an exciting opportunity to work with machine emulation and virtualization.
By Osier Yang, Michael Roth, and Stefan Hajnoczi, QEMU.org Mentors