Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 798220

Summary: [libvirt]can't start guest with spice
Product: Red Hat Enterprise Linux 6 Reporter: zhpeng
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, ajia, cwei, dallan, dyuan, jdenemar, jwu, kraxel, mzhan, rwu, vehrlich, weizhan, zpeng
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.9.10-4.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:49:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhpeng 2012-02-28 11:24:21 UTC
Description of problem:
can't start guest with spice

Version-Release number of selected component (if applicable):
kernel-2.6.32-232.el6.x86_64
libvirt-python-0.9.10-3.el6.x86_64
libvirt-0.9.10-3.el6.x86_64
libvirt-client-0.9.10-3.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.233.el6.x86_64
qemu-img-0.12.1.2-2.233.el6.x86_64
qemu-kvm-0.12.1.2-2.233.el6.x86_64
spice-server-0.10.1-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.define a guest:
...
     <graphics type='spice' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
...

2.try to start guest
# virsh start kvm1
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
spice tls-port is out of range

[root@pengzhimoutest ~]# tail /var/log/libvirt/qemu/kvm1.log
Home directory / not ours.
pulseaudio: pa_simple_new for capture failed
pulseaudio: Reason: Connection refused
audio: Failed to create voice `adc'
qemu: terminating on signal 15 from pid 2388
2012-02-28 03:16:58.613+0000: shutting down
2012-02-28 03:17:09.053+0000: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name kvm1 -uuid 77592777-6feb-2416-786f-1ba803c4ee3e -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/kvm1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/kvm1.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c8:a1:70,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -spice port=5900,tls-port=4294967295,addr=127.0.0.1,disable-ticketing -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
char device redirected to /dev/pts/1
spice tls-port is out of range2012-02-28 03:17:09.365+0000: shutting down



Actual resultes:
Fail to start
-spice port=5900,tls-port=4294967295,addr=127.0.0.1 tlsport is too big

Expected results:
Spice can work, guest can be start


Additional info:

Comment 2 Dave Allan 2012-02-28 15:24:20 UTC
Just a SWAG, but it looks to me like the XML isn't quite correct and we're using -1 as the port.

Comment 3 Michal Privoznik 2012-02-28 16:18:30 UTC
Dave, you're right. It's regression introduced in fix for 790436; Long story short - we are missing curly braces around one block adding tls-port to the qemu command line. Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2012-February/msg01099.html

Comment 6 Gerd Hoffmann 2012-03-01 09:49:04 UTC
*** Bug 798905 has been marked as a duplicate of this bug. ***

Comment 9 zhe peng 2012-03-08 03:33:56 UTC
verify with:
libvirt-0.9.10-4.el6.x86_64
kernel-2.6.32-232.el6.x86_64
spice-server-0.10.1-4.el6.x86_64
qemu-kvm-0.12.1.2-2.233.el6.x86_64

step:
1.define a guest:
...
     <graphics type='spice' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
...

2.try to start guest
# virsh start $guestname
no error display, the guest can start successful.
use virt-viewer can open guest graphic console
#ps -ef | grep $guestname
qemu     23327     1  7 22:18 ?        00:01:20 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name rhel6.3 -uuid 0cf5ebf9-2397-5dea-97b2-ea78da13b70c -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6.3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/rhel6.3.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:66:4a:35,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -spice port=5902,addr=127.0.0.1,disable-ticketing -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

verification passed.

Comment 10 Cole Robinson 2012-04-02 21:45:54 UTC
*** Bug 802899 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2012-06-20 06:49:12 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/RHSA-2012-0748.html