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 1283207 - RFE: implement max_monitor option for qxl video
Summary: RFE: implement max_monitor option for qxl video
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: All
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.3
Assignee: Martin Kletzander
QA Contact: Fangge Jin
Jiri Herrmann
URL:
Whiteboard:
Depends On: 1283198 1283202
Blocks: 1075798
TreeView+ depends on / blocked
 
Reported: 2015-11-18 12:58 UTC by Frediano Ziglio
Modified: 2017-08-02 01:25 UTC (History)
18 users (show)

Fixed In Version: libvirt-3.2.0-11.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:06:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Frediano Ziglio 2015-11-18 12:58:23 UTC
Description of problem:
This is to support https://bugzilla.redhat.com/show_bug.cgi?id=1075798 in newer RHEL version.


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

How reproducible:
Always.

Steps to Reproduce:
1. Try to set monitor number from interface (like virt-manager).
2. Open spice client
3. Try to open more monitors than configured number

Actual results:
Displays are opened without problems.

Expected results:
Failure and client should not even prompt for such setting.

Additional info:
This was implemented in commit 7b401c3bdacdf8367a0070e625d73eafb802045d but removed by a5bdb8459a8187cba3e1d41036de0bd0ae027c85 as incompatibility with XML format. Some solution was indicated by libvirt team but all required changes by team itself. Actually there has been no progress.

Comment 2 Martin Kletzander 2016-03-10 14:38:31 UTC
Another round posted upstream:

https://www.redhat.com/archives/libvir-list/2016-March/msg00410.html

Comment 3 Martin Kletzander 2016-03-24 16:07:53 UTC
Current version is this one now:

https://www.redhat.com/archives/libvir-list/2016-March/msg01198.html

Comment 5 Christophe Fergeau 2016-04-27 11:55:26 UTC
Is this still planned for 7.3? Just double checking before adding the needed patches to the spice package.

Comment 6 Martin Kletzander 2016-04-27 12:21:56 UTC
The question is: how does this look upstream?  I just received question yesterday about one thing in the patches and it basically was about why don't we go the way of another version.  So it's just waiting for reviews and people caring about how do we handle compatibility.

Comment 7 Christophe Fergeau 2016-04-27 12:37:18 UTC
(In reply to Martin Kletzander from comment #6)
> The question is: how does this look upstream?

Oh sorry for the ping then, I did not pay enough attention to the upstream mailing list lately and assumed this had been merged already.

Comment 8 Martin Kletzander 2016-04-27 13:19:57 UTC
No problem.  I would update this BZ if there was a change.  I'll keep this BZ posted.

Comment 9 Martin Kletzander 2016-06-07 10:48:49 UTC
Fixed upstream with v1.3.5-29-g6e81a1f9ef21..v1.3.5-30-g3484c05ce0dc: 

commit 6e81a1f9ef21e0e01f7fda996f19070f51bd63a8
Author: Martin Kletzander <mkletzan>
Date:   Fri Dec 11 14:26:24 2015 +0100

    qemu: Check for qxl's max_outputs parameter
    
commit 3484c05ce0dc34064cc2f81636482b93771803ad
Author: Martin Kletzander <mkletzan>
Date:   Fri Dec 11 14:43:10 2015 +0100

    qemu: Add support to QXL's max_outputs parameter

Comment 11 Xuesong Zhang 2016-09-09 06:03:28 UTC
hi, Martin,

The depend on BZ 1283198 and 1283202 are all moved to RHEL7.4, we can not verify this libvirt bug, should we move this bug to RHEL7.4 also? Thanks.

Comment 12 Martin Kletzander 2016-09-09 08:15:00 UTC
Are there any packages you could verify this with?  If not, then probably just move it to next release, set the TestOnly Keyword and write the reason for that in this BZ.  Or I guess your comment and mine are enough of a description for that =)

Comment 13 Fangge Jin 2016-09-12 07:39:51 UTC
Test with latest libvirt and qemu-kvm-rhev, it seems that qemu-kvm-rhev doesn't support max_outputs for now.

Builds:
libvirt-2.0.0-8.el7.x86_64
qemu-kvm-rhev-2.6.0-23.el7.x86_64

Steps:
1.Prepare a domain with the following xml, set head='3' for video device:
...
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='3' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </video>

2. Start guest

3. Check qemu command line, no max_outputs option is added:
..-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,bus=pci.0,addr=0x6 ...

4. Try to start qemu with the following command line:
# /usr/libexec/qemu-kvm -device qxl-vga,max_outputs=2
qemu-kvm: -device qxl-vga,max_outputs=2: Property '.max_outputs' not found

# /usr/libexec/qemu-kvm -device qxl,max_outputs=2
qemu-kvm: -device qxl,max_outputs=2: Property '.max_outputs' not found

Comment 14 Martin Kletzander 2016-09-12 09:25:24 UTC
(In reply to JinFangge from comment #13)
You can try it with upstream QEMU if you want to verify this bug.

Comment 15 Xuesong Zhang 2016-09-12 09:38:31 UTC
(In reply to Martin Kletzander from comment #14)
> (In reply to JinFangge from comment #13)
> You can try it with upstream QEMU if you want to verify this bug.

hi, Martin,

We add the current verify result and steps in comment 13 for reference. Per comment 11, 12 and 13, we'd like to move this bug to RHEL7.4 and mark as Testonly. We are not sure if this feature will be working well with the upstream QEMU now, since this feature will be implemented with spice(BZ1283202), qemu(BZ1283198) and libvirt(this BZ) components together, this feature is still not working well in spice and qemu till now, you can see the details in the other bugs.
So, we'd like to move this bug to RHEL7.4 with testonly, I think it's ok for your per comment 12, right?

Comment 16 Martin Kletzander 2016-09-12 12:21:30 UTC
(In reply to Xuesong Zhang from comment #15)
Sure, that works for me.

Comment 17 Xuesong Zhang 2016-09-12 14:24:56 UTC
Per comments 11 to 16, move this bug to RHEL7.4 and add keyword "testonly" since the patches are included in current build already.

Comment 19 Fangge Jin 2017-04-26 10:23:29 UTC
Verify with build:
libvirt-3.2.0-3.el7.x86_64
qemu-kvm-rhev-2.9.0-1.el7.x86_64


Steps:
1. Prepare a guest with spice graphic and video->head set to 3:
...
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
...

2. Start guest:
# virsh start rhel7.4

3. Check qemu command line, max_outputs is set correctly:
...
-device qxl-vga,id=video0,ram_size=67108864,vram_size=16777216,vram64_size_mb=0,vgamem_mb=16,max_outputs=3,bus=pci.0,addr=0x7 
-device qxl,id=video1,ram_size=67108864,vram_size=16777216,vram64_size_mb=0,vgamem_mb=16,max_outputs=4,bus=pci.0,addr=0x8
...

Comment 22 David Jaša 2017-06-09 13:59:59 UTC
I fear we've regressed since libvirt-2.0:

$ rpm -q libvirt-daemon ; cat libvirt_vms/qxl.xml ; virsh domxml-to-native qemu-argv libvirt_vms/qxl.xml 
libvirt-daemon-3.2.0-9.el7.x86_64
<domain type='kvm'>
  <name>qxl</name>
  <memory unit='MiB'>32</memory>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
  </os>
  <devices>
    <graphics type='spice'/>
    <video>
      <model type='qxl' heads='2'/>
    </video>
  </devices>
</domain>
LC_ALL=C PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/djasa/.local/bin:/home/djasa/bin HOME=/home/djasa USER=djasa LOGNAME=djasa QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name qxl -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off -m 32 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 55e1d942-7512-49b5-8278-7274a861c28e -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/home/djasa/.config/libvirt/qemu/lib/domain--1-qxl/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -spice port=0,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -global qxl-vga.vgamem_mb=16 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -msg timestamp=on

--> no max_outputs=<num> in the qemu CLI (nor it is in some full-blown domain xmls needed to do end-to-end test)

Comment 23 Martin Kletzander 2017-06-12 20:57:53 UTC
(In reply to David Jaša from comment #22)
I don't have a rhel7 machine handy, but upstream work fine.  What's your qemu version?  Since this is in unit tests, which are, I believe, ran during build, it would fail building in case it wouldn't work.

What is the output of `qemu-system-x86_64 -device qxl,\? 2>&1 | grep max_` on your system?  And without the grep?

Comment 24 David Jaša 2017-06-13 14:17:09 UTC
(In reply to Martin Kletzander from comment #23)
> (In reply to David Jaša from comment #22)
> I don't have a rhel7 machine handy, but upstream work fine.  What's your
> qemu version?  Since this is in unit tests, which are, I believe, ran during
> build, it would fail building in case it wouldn't work.
> 
> What is the output of `qemu-system-x86_64 -device qxl,\? 2>&1 | grep max_`
> on your system?  And without the grep?

I retested with:
current el7 qemu: qemu-kvm-1.5.3-140.el7.x86_64
current RHV qemu: qemu-kvm-rhev-2.6.0-28.el7_3.10.x86_64
future RHV qemu: qemu-kvm-rhev-2.9.0-9.el7.x86_64

only to-be-released RHV qemu 2.9 advertises the qxl.max_outputs=uint16 knob and with it, libvirt adds the option successfully (see below). So we can go back to VERIFIED and I'm sorry for the noise.


$ rpm -q qemu-kvm{,-rhev} ; /usr/libexec/qemu-kvm -device qxl,\? 2>&1 | grep max_outputs ; virsh domxml-to-native qemu-argv libvirt_vms/qxl.xml 
package qemu-kvm is not installed
qemu-kvm-rhev-2.9.0-9.el7.x86_64
qxl.max_outputs=uint16

LC_ALL=C PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/djasa/.local/bin:/home/djasa/bin HOME=/home/djasa USER=djasa LOGNAME=djasa QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name guest=qxl,debug-threads=on -object secret,id=masterKey0,format=raw,file=/home/djasa/.config/libvirt/qemu/lib/domain--1-qxl/master-key.aes -machine pc-i440fx-rhel7.4.0,accel=kvm,usb=off,dump-guest-core=off -m 32 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 763338e8-db27-4ead-83d9-173a0342fdce -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/home/djasa/.config/libvirt/qemu/lib/domain--1-qxl/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -no-acpi -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -spice port=0,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=2,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -msg timestamp=on

Comment 25 David Jaša 2017-06-13 16:04:24 UTC
Sorry for the noise again, I noticed something weird in the outputs for qemu 1.5:

$ rpm -q qemu-kvm{,-rhev} ; /usr/libexec/qemu-kvm -device qxl,\? 2>&1 | grep max_outputs ; virsh domxml-to-native qemu-argv libvirt_vms/qxl.xml 
qemu-kvm-1.5.3-140.el7.x86_64
package qemu-kvm-rhev is not installed
qxl.max_outputs=uint16

^^^   <-- qemu advertises capability

... -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -global qxl-vga.vgamem_mb=16 ...

and no max_outputs are here.

Libvirt also generates old CLI format for qemu 1.5 instead of new one used by Virt QE for qemu test in bug 1283198 comment 31:

...
>         -device qxl-vga \
> 
> Check multi heads from remote-viewer: View -> Displays, there are Display
> (2), (3), (4) there and both of them can be enabled without problem.
> 
> Boot guest with similar qemu cli but add option max_outputs=2 to
> qxl-vga(-device qxl-vga,max_outputs=2), check multi heads, only Display (2)
> there and  it can be enabled and display correct.

Comment 26 Martin Kletzander 2017-06-14 06:20:00 UTC
(In reply to David Jaša from comment #25)
That's because of Bug 981094 and has nothing to do with this one.  If you encounter yet another issue, please ask before moving already verified bug to assigned or create another bug.  Thank you.

Comment 27 Martin Kletzander 2017-06-14 09:07:03 UTC
OK, you might actually have a point there.  We need to test it with qemu-kvm-rhev as well as qemu-kvm as well since there are different command line arguments used for that.  I'll post a patch in a while.

Comment 28 David Jaša 2017-06-14 10:52:06 UTC
I can confirm that -global qxl-vga.max_outputs=2 works OK.

Comment 29 Martin Kletzander 2017-06-14 14:39:48 UTC
Additional tiny fix posted upstream:

https://www.redhat.com/archives/libvir-list/2017-June/msg00606.html

Comment 31 Fangge Jin 2017-06-23 08:34:36 UTC
Reproduced with builds:
libvirt-3.2.0-10.el7.x86_64
qemu-kvm-1.5.3-141.el7.x86_64

Verify with builds:
qemu-kvm-1.5.3-141.el7.x86_64
libvirt-3.2.0-15.el7a.x86_64
 
1) single video
config:
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
 
active:
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
 
qemu command line:
   -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=16777216 -global qxl-vga.vgamem_mb=16 -global **qxl-vga.max_outputs=3**
                                            
 
2) multiple videos
config:
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
 
 
active:
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <video>
      <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='3'/>
      <alias name='video1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </video>
 
qemu command line:
-vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=16777216 -global qxl-vga.vgamem_mb=16 -global **qxl-vga.max_outputs=3** -device qxl,id=video1,ram_size=67108864,vram_size=16777216,vram64_size_mb=0,vgamem_mb=16,max_outputs=3,bus=pci.0,addr=0x8

Comment 32 errata-xmlrpc 2017-08-01 17:06:41 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://access.redhat.com/errata/RHEA-2017:1846

Comment 33 errata-xmlrpc 2017-08-01 23:48:45 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://access.redhat.com/errata/RHEA-2017:1846

Comment 34 errata-xmlrpc 2017-08-02 01:25:04 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://access.redhat.com/errata/RHEA-2017:1846


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