Description of problem:
If qemu-kvm command is launched with unspecified port option (e.g. "-spice port="), it starts normally.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Start VM with unspecified spice port ('-spice port=') for example:
/usr/libexec/qemu-kvm -machine pc -nodefaults -vga qxl -device intel-hda,bus=pci.0,addr=03 -device hda-duplex -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=04 -chardev spicevmc,id=idSwuYmk,name=vdagent -devicevirtserialport,id=idBWNLHY,name=com.redhat.spice.0,bus=virtio_serial_pci0.0,chardev=idSwuYmk -drive id=drive_image1,if=none,cache=none,format=qcow2,file=Rhel7.2 -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=05 -m 1024 -spice disable-ticketing,port= -monitor stdio
VM starts normally.
(qemu) info spice -> No listening address specified
qemu-kvm will exit with code 1, and following message:
'neither port nor tls-port specified for spice' or something like this
Sent one-liner patch "[PATCH] qemu-option: reject empty number value", not sure it's really going to happen, foo= default to value 0 is perhaps an acceptable behaviour.
Fixed from 2.9:
Author: Markus Armbruster <firstname.lastname@example.org>
Date: Tue Feb 21 21:13:53 2017 +0100
option: Fix to reject invalid and overflowing numbers
sent patch to rhvirt-list "[RHEL-7.4 qemu-kvm PATCH] qemu-option: reject empty number value"
sent new version "[RHEL-7.5 qemu-kvm PATCH v2] qemu-option: reject empty number value"
Fix included in qemu-kvm-1.5.3-148.el7
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.