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 682237 - Add support for configuring Spice compression options
Summary: Add support for configuring Spice compression options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 667628 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-04 15:05 UTC by Andrew Cathrow
Modified: 2014-09-07 22:53 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.9.2-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: SPICE supports multiple compression options to be set (e.g. image, jpeg, audio, ...). Users should be able to set these Consequence: Libvirt should allow this Change: Libvirt XML schema was extended to support these kind of settings Result: Users can set spice compression options via libvirt
Clone Of:
Environment:
Last Closed: 2011-12-06 10:55:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Andrew Cathrow 2011-03-04 15:05:38 UTC
Spice supports variable compression settings for audio, images and streaming.

We need the ability to set these on a per-vm basis.

Image compression (lossless) : 
image-compression=[auto_glz|auto_lz|quic|glz|lz|off]

JPEG compression for images over wan
jpeg-wan-compression=[auto|never|always]

Configure wan image compression (lossy for slow links)
zlib-glz-wan-compression=[auto|never|always]

Enable/disable audio stream compression 
playback-compression=[on|off]

Comment 1 Andrew Cathrow 2011-03-04 15:07:53 UTC
David,

can someone from your team check the list of options here to make sure it's accurate and complete

Comment 2 Michal Privoznik 2011-04-13 14:39:00 UTC
Posted upstream:

https://www.redhat.com/archives/libvir-list/2011-April/msg00641.html

Comment 3 Michal Privoznik 2011-04-14 08:46:38 UTC
v1 wasn't good enough. Sent v2:

https://www.redhat.com/archives/libvir-list/2011-April/msg00694.html

Comment 4 Michal Privoznik 2011-04-15 07:04:09 UTC
Pushed into upstream:

commit abb1570eac1bea918fedf17c8a29ec2c61d77abc
Author: Michal Privoznik <mprivozn>
Date:   Thu Apr 14 10:44:20 2011 +0200

    Spice: support audio, images and stream compression
    
    This extends the SPICE XML to allow variable compression settings for audio,
    images and streaming:
        <graphics type='spice' port='5901' tlsPort='-1' autoport='yes'>
            <image compression='auto_glz'/>
            <jpeg compression='auto'/>
            <zlib compression='auto'/>
            <playback compression='on'/>
        </graphics>
    
    All new elements are optional.


v0.9.0-94-gabb1570

Comment 5 Michal Privoznik 2011-04-20 07:20:45 UTC
I've tested this against spice-0.5 (qemu-0.14.0) and spice-client-0.8.0-2 (qemu-0.12.1.2) and works well for me. Libvirt test suite doesn't object anything too.

Comment 6 zhanghaiyan 2011-05-24 10:23:21 UTC
Seems the above graphic xml format is incorrect when testing with libvirt-0.9.1-1.el6.x86_64

1. Delete the vnc graphic info in guest xml file and add the following spice graphic info in guest
# cat /mnt/rhel61_x86_64.xml
        <graphics type='spice' port='5901' tlsPort='-1' autoport='yes'>
            <image compression='auto_glz'/>
            <jpeg compression='auto'/>
            <zlib compression='auto'/>
            <playback compression='on'/>
        </graphics>
2. # virsh define /mnt/rhel61_x86_64.xml
Check the spice info and find it is modified as below
# virsh dumpxml rhel61_x86_64
......
    <graphics type='spice' autoport='yes'      <image compression='auto_glz'/>
      <jpeg compression='auto'/>
      <zlib compression='auto'/>
      <playback compression='on'/>
/>
......
3.# virsh start rhel61_x86_64
error: Failed to start domain rhel61_x86_64
error: at line 42: error parsing attribute name
The line 42 is : <graphics type='spice' autoport='yes'      <image compression='auto_glz'/>

Comment 7 Michal Privoznik 2011-05-24 14:55:52 UTC
Patch sent upstream for review:

https://www.redhat.com/archives/libvir-list/2011-May/msg01491.html

Comment 8 Michal Privoznik 2011-06-02 12:06:47 UTC
Fixed and moving to POST:

commit 155542a57fa8498d762b00c3a7adc285c40a3ce9
Author: Michal Privoznik <mprivozn>
Date:   Tue May 24 13:43:30 2011 +0200

    conf: Fix incorrect spice graphic XML format on compression options
    
    If spice graphics has no <channel> elements, the output graphics XML
    is messed up. To prevent this, we need to end the <graphics> element
    just before adding any compression selecting elements.

v0.9.1-317-g155542a

Comment 9 Daniel Veillard 2011-06-23 02:50:16 UTC
This should be fixed by the libvirt-0.9.2-1.el6 rebase

Comment 10 zhanghaiyan 2011-06-24 06:01:15 UTC
Verified pass with libvirt-0.9.2-1.el6.x86_64
- 2.6.32-156.el6.x86_64
- qemu-kvm-0.12.1.2-2.165.el6.x86_64

1. Delete the vnc graphic info in guest xml file and add the following spice
graphic info in guest
# cat /mnt/rhel61.xml
        <graphics type='spice' port='5901' autoport='no'>
            <image compression='auto_glz'/>
            <jpeg compression='auto'/>
            <zlib compression='auto'/>
            <playback compression='on'/>
        </graphics>
2. # virsh define /mnt/rhel61.xml
3.# virsh start rhel61
Domain rhel61 started
4. Check the xml info is the same as set
# virsh dumpxml rhel61
...
    <graphics type='spice' port='5910' autoport='no'>
      <image compression='auto_glz'/>
      <jpeg compression='auto'/>
      <zlib compression='auto'/>
      <playback compression='on'/>
    </graphics>

...
5. Connect to the guest and it works well

Comment 12 Rita Wu 2011-07-06 10:30:36 UTC
Set it as VERIFIED per comment10

Comment 13 Michal Privoznik 2011-07-28 09:28:00 UTC
*** Bug 667628 has been marked as a duplicate of this bug. ***

Comment 14 Michal Privoznik 2011-11-11 16:16:31 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: SPICE supports multiple compression options to be set (e.g. image, jpeg, audio, ...). Users should be able to set these 

Consequence: Libvirt should allow this

Change: Libvirt XML schema was extended to support these kind of settings

Result: Users can set spice compression options via libvirt

Comment 15 errata-xmlrpc 2011-12-06 10:55:17 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.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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