On 25.08.2016 08:05, Tadas wrote:
Hello lists,
I have strange issue while creating VM screenshots.
virsh screenshot vmname produces ppm image. But when i try to make
second screenshot, it produces the same image, even is VM screen has
changed. Running screenshot on third time, it produces correct image.
It looks like screenshot is producing last image every second time it
is ran.
Yeah, I've managed to reproduce the issue and I can confirm the buggy
behaviour. However, to me it looks like a qemu bug. I mean, the way this
is implemented in libvirt is the following:
1) libvirtd creates a temp file
2) libvirtd instructs qemu to dump screenshot into it
3) libvirtd transfers the file to client
4) libvirtd removes the temp file
So, I've changed libvirtd to not do 4) (really easy just delete
unlink_tmp = true; from qemuDomainScreenshot()). And I can see the same
image on both client and daemon side. This can mean only one thing: qemu
is not updating guest screen before taking screenshot. However, I'm not
experienced enough with qemu code to understand why. I guess you should
ask on qemu-devel list.
Michal