RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1366119 - Screenshot does not work with qxl video model type.
Summary: Screenshot does not work with qxl video model type.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-11 06:05 UTC by Yanqiu Zhang
Modified: 2016-11-03 18:52 UTC (History)
7 users (show)

Fixed In Version: libvirt-2.0.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:52:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log_qxl_failed (300.88 KB, text/plain)
2016-08-11 06:05 UTC, Yanqiu Zhang
no flags Details
log_cirrus_success (771.02 KB, text/plain)
2016-08-11 06:08 UTC, Yanqiu Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Yanqiu Zhang 2016-08-11 06:05:17 UTC
Created attachment 1189914 [details]
log_qxl_failed

Description of problem:
Screenshot does not work with qxl video model type.

Version-Release number of selected component (if applicable):
libvirt-2.0.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a domain with following xml:
......
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
    </graphics>
......
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
......

2.# virsh start usrvm 

3.Do screenshot operation:
# virsh screenshot usrvm
error: could not take a screenshot of usrvm
error: invalid argument: no such screen

4.Edit domain xml with 'vnc' graphics, retest step 2~3
      <graphics type='vnc' port='-1' autoport='yes'>
      <listen type='address'/>
    </graphics>

5.Check error in log file:
# cat /var/log/libvirt/libvirtd.log|grep error
2016-08-11 05:39:31.060+0000: 27707: error : qemuDomainScreenshot:3807 : invalid argument: no such screen
For detailed logs, pls refer to attachment.

Actual results:
As step 3 descripted. And step 4 got the same error.
Both spice and vnc graphics can trigger this problem.

Expected results:
Screenshot should be done successfully.

Additional info:
1.It works well with "virtio"/"vga"/"cirrus" video model type:
             ...
      <model type='vga' vram='16384' heads='1' primary='yes'/>
             ...
# virsh screenshot usrvm
Screenshot saved to usrvm-2016-08-11-12:50:08.ppm, with type of image/x-portable-pixmap
             ...
      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
             ...
# virsh screenshot usrvm
Screenshot saved to usrvm-2016-08-11-12:52:47.ppm, with type of image/x-portable-pixmap
             ...
      <model type='virtio' vram='16384' heads='1' primary='yes'/>
             ...
# virsh screenshot usrvm
Screenshot saved to usrvm-2016-08-11-12:53:58.ppm, with type of image/x-portable-pixmap

# ls|grep ppm
usrvm-2016-08-11-12:50:08.ppm
usrvm-2016-08-11-12:52:47.ppm
usrvm-2016-08-11-12:53:58.ppm


2.It works well on rhel7.2 with libvirt-1.2.17-13.el7.x86_64.
Steps:
Scp the xml with qxl video to rhel7.2 host, define and start the guest, do screenshot:
# virsh screenshot usrvm
Screenshot saved to usrvm-2016-08-10-18:57:48.ppm, with type of image/x-portable-pixmap
# ls | grep ppm
usrvm-2016-08-10-18:57:48.ppm
 
3.This problem also happens with libvirt-2.0.0-2.el7.x86_64 or libvirt-2.0.0-4.el7.x86_64.

Comment 1 Yanqiu Zhang 2016-08-11 06:08:39 UTC
Created attachment 1189915 [details]
log_cirrus_success

Comment 3 Yanqiu Zhang 2016-08-11 08:01:25 UTC
I found that maybe the "heads" attribute affects.

1.After start the guest, its video xml changes to be:
 <model type='qxl' ram='65536' vram='65536' vgamem='16384' primary='yes'/>

"heads=1" is automatically deleted.


2.But it wasn't deleted when use "virtio"/"vga"/"cirrus" video model type.

3.And it also reserved on rhel7.2 with libvirt-1.2.17-13.el7.x86_64:
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>

4.If restart libvirtd, the "heads" attribute returns:
# diff before_libvirtd after_libvirtd
148c148
<       <model type='qxl' ram='65536' vram='65536' vgamem='16384' primary='yes'/>
---
>       <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
And sceenshot operation can be done successfully.

Comment 4 Pavel Hrdina 2016-08-15 10:57:24 UTC
Upstream commit:

commit ef11e770da543c171f044bbd579e482febcd9b63
Author: Pavel Hrdina <phrdina>
Date:   Fri Aug 12 16:12:39 2016 +0200

    qemu_command: don't modify heads for graphics device

Comment 7 Fangge Jin 2016-08-26 06:47:22 UTC
Reproduced on build libvirt-2.0.0-5.el7.x86_64

Verify pass on build libvirt-2.0.0-6.el7.x86_64
Steps:
1. Prepare a domain with video head=2:
    <video>
      <model type='qxl' ram='1048576' vram='16384' vgamem='16384' **heads='2'** primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>


2. Start guest and take screenshots :
# virsh screenshot rhel7
Screenshot saved to rhel7-2016-08-26-14:46:55.ppm, with type of image/x-portable-pixmap

# virsh screenshot rhel7 --screen 0
Screenshot saved to rhel7-2016-08-26-14:38:04.ppm, with type of image/x-portable-pixmap

# virsh screenshot rhel7 --screen 1
Screenshot saved to rhel7-2016-08-26-14:38:05.ppm, with type of image/x-portable-pixmap

# virsh screenshot rhel7 --screen 2
error: could not take a screenshot of rhel7
error: invalid argument: no such screen

3. Check dumpxml, heads='2' is output in dumpxml:
# virsh dumpxml rhel7
    <video>
      <model type='qxl' ram='524288' vram='16384' vgamem='16384' **heads='2'** primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

4. Restart libvirtd and check dumpxml again:
# virsh dumpxml rhel7
    <video>
      <model type='qxl' ram='524288' vram='16384' vgamem='16384' **heads='2'** primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

Comment 9 errata-xmlrpc 2016-11-03 18:52:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


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