Description of problem:
As explained here: http://firstname.lastname@example.org/msg16458.html
We have the option to run qemu/kvm guests unprivileged since libvirt 0.7.0.
Everything seems to work fine except the save functionality (virsh save domain /tmp/domain.state)
In fact, there's no error when we try to save a guest, just the saved state file is almost empty and of course, unusable.
The reason seems to be that libvirt first
create the destination file to write the header and the XML definition.
The file is owned by root with 600 permission. Then, we ask qemu to
append the dump of the memory (via the migrate exec: call) to this file.
This part doesn't work because the qemu user cannot write to this file.
So we endup with a file which only contains the header and the XML, and
the guest is stoped :/
Version-Release number of selected component (if applicable):
libvirt 0.7.0 and 0.7.1
Steps to Reproduce:
1. Configure /etc/libvirt/qemu.conf to run qemu guests under qemu account
2. Restart libvirt and start a domain (verify the the process is running as the qemu user or whatever you have configured)
3. Try to save this guest (with virsh save domain /tmp/domain.state for example)
4. look at the size of the saved file :/ You can try to restore it, but you already know how it'll end ;)
The state of the guest is not written to the file
The save function should work the same way it does when we run qemu as root
Fix posted upstream
Fixed in 0.7.4 release