Bug 664190 - Wrong "addr" Spice parameter in libvirt 0.8.6
Wrong "addr" Spice parameter in libvirt 0.8.6
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
Depends On:
  Show dependency treegraph
Reported: 2010-12-18 20:05 EST by Amador Pahim
Modified: 2011-03-01 06:19 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-03-01 06:19:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch disabling addr (1.29 KB, patch)
2011-01-30 18:22 EST, Julian Sikorski
no flags Details | Diff
Patch that actually works (931 bytes, patch)
2011-01-30 18:29 EST, Julian Sikorski
no flags Details | Diff
final patch version (1.62 KB, patch)
2011-01-30 19:11 EST, Julian Sikorski
no flags Details | Diff

  None (edit)
Description Amador Pahim 2010-12-18 20:05:51 EST
Description of problem:
Running libvirt 0.8.6, spice parameters does not work

Version-Release number of selected component:

Steps to Reproduce:
Change VM XML file to this (instead VNC):
<graphics type='spice' port='5903' />

Try to start VM with:
# virsh start Ubuntu

Actual results:
error: Failed to start domain Ubuntu
error: internal error Process exited while reading console log output: qemu-kvm: -spice port=5903,addr=,disable-ticketing: Invalid parameter 'addr'
parse error: port=5903,addr=,disable-ticketing

Expected results:
Domain Ubuntu started

Additional info:
To fix that, I had to edit the "src/qemu/qemu_command.c", in libvirt source, commenting this lines:

 *       if (def->graphics[0]->data.spice.listenAddr)
 *          virBufferVSprintf(&opt, ",addr=%s", def->graphics[0] >data.spice.listenAddr);
 *       else if (driver->spiceListen)
 *          virBufferVSprintf(&opt, ",addr=%s", driver->spiceListen);
Comment 1 Julian Sikorski 2011-01-30 18:22:17 EST
Created attachment 476095 [details]
patch disabling addr

I tried patching the rawhide srpm with the attached patch, but it fails to build on f14 mock giving errors like:
/usr/lib/gcc/x86_64-redhat-linux/4.5.1/include/stdarg.h:40:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
Comment 2 Julian Sikorski 2011-01-30 18:29:05 EST
Created attachment 476096 [details]
Patch that actually works

Erm, after posting this I realised where I screwed up. Feel free to ignore me, it's late.
Comment 3 Julian Sikorski 2011-01-30 18:38:17 EST
Well, I spoke too soon. The qemuxml2argvtest which are a part of rpm build process fails.
Comment 4 Julian Sikorski 2011-01-30 19:11:05 EST
Created attachment 476100 [details]
final patch version

The final version also disables the failing test so that the SRPM can be rebuilt.
Comment 5 Julian Sikorski 2011-03-01 02:30:03 EST
$ rpm -q spice-client libvirt

With these packages everything seems to work. Looking at the logs it seems spice accepts addr parameter now.
Comment 6 Daniel Berrange 2011-03-01 06:19:35 EST
The problem here is that in the Fedora 14 version of QEMU, the SPICE support is done via a set of non-upstream patches. These patches did not include the 'addr' element. libvirt is designed to work with the upstream QEMU codebase. I have verified that it works with the Fedora 15 version fo QEMU.

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