Bug 1018668 - screenshot command does not take effect immediately agaist a VM with UI desktop window.
screenshot command does not take effect immediately agaist a VM with UI deskt...
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Guo, Zhiyi
Depends On:
  Show dependency treegraph
Reported: 2013-10-14 03:00 EDT by zhengqin
Modified: 2018-07-18 10:21 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description zhengqin 2013-10-14 03:00:52 EDT
Description of problem:
virsh screenshot <domain> could not take effect immediately

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create and open a RHEL6.5 VM with Graphic Interface UI from virt-manager, and then open a gnome-terminal window in this VM.
2. From the host machine, issue following command to check screenshot function:
#virsh send-key <domainVM> KEY_E KEY_C KEY_H KEY_O KEY_SPACE KEY_F KEY_I KEY_R KEY_S KEY_T KEY_ENTER ; virsh screenshot <domainVM> first.ppm

Actual results:
Empty gnome-terminal window display in screenshot first.ppm

Expected results:
The key "echo first" and a new line with "first" should be displayed in screenshot first.ppm

Additional info:
1. This issue does not occur on latest RHEL6.5 Host environment;
2. This issue does not occur with button "Take Screenshot" from VM Windows in Virtual Manager;
3. This issue also occurs if you wait some times before taking screenshot in reproduce step 2 just like issue following command:
#virsh send-key <domainVM> KEY_E KEY_C KEY_H KEY_O KEY_SPACE KEY_F KEY_I KEY_R KEY_S KEY_T KEY_ENTER ;    sleep 30 ;   virsh screenshot <domainVM> first.ppm
4. This issue occurs agaist both on a VM with KDE and GNOME desktop environment.
5. This issue does not occur agaist a VM without graphic interface.
Comment 1 Giuseppe Scrivano 2014-06-18 07:41:13 EDT
I get the same error using this command (that is what the virsh screenshot command does behind the scenes):

virsh send-key $VM_NAME KEY_E KEY_C KEY_H KEY_O KEY_SPACE KEY_A KEY_ENTER; sleep 30; virsh qemu-monitor-command $VM_NAME '{"execute":"screendump", "arguments": { "filename": "/tmp/foo.ppm"}}'

I am reassigning to qemu for further probing of this issue.
Comment 2 Gerd Hoffmann 2014-06-19 09:00:25 EDT
Test case isn't valid.  There is no guarantee that the guest has successfully processed the key presses by the time the screenshot command is executed.

Nevertheless there is a known issue with qxl due to spice-server doing local rendering asynchronously.  stdvga and cirrus don't have this problem.  Fix is non-trivial because monitor can't sleep & wait.
Comment 6 Gerd Hoffmann 2016-04-15 08:03:56 EDT
Marc-André kicked async monitor discussion upstream recently:


Adding him to Cc:
Comment 7 Gerd Hoffmann 2016-06-13 11:14:16 EDT
not solved yet upstream -> defer to 7.4
Comment 8 Gerd Hoffmann 2017-01-09 09:54:32 EST
> not solved yet upstream -> defer to 7.4
same again.  Not solved, nobody working on it, very unlikely to make 7.4
Comment 9 Gerd Hoffmann 2018-06-13 07:13:47 EDT
Looks like we have async monitor some progress upstream,
block-jobs evolving into generic jobs.

Need to check whenever this actually helps with this issue.
Also merged upstream after 2.12, so not available for 7.6.
Most likely this will be deferred again ...

Note You need to log in before you can comment on or make changes to this bug.