Hide Forgot
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]
David, can someone from your team check the list of options here to make sure it's accurate and complete
Posted upstream: https://www.redhat.com/archives/libvir-list/2011-April/msg00641.html
v1 wasn't good enough. Sent v2: https://www.redhat.com/archives/libvir-list/2011-April/msg00694.html
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
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.
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'/>
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2011-May/msg01491.html
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
This should be fixed by the libvirt-0.9.2-1.el6 rebase
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
Set it as VERIFIED per comment10
*** Bug 667628 has been marked as a duplicate of this bug. ***
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
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