Red Hat Bugzilla – Bug 733600
qemu-kvm doesn't report error when supplied negative vnc port value
Last modified: 2015-03-05 04:41:02 EST
Description of problem: (1)qemu-kvm doesn't show any error when user supplies a negative port value to -vnc (2) Version-Release number of selected component (if applicable): #rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.184.el6.x86_64 #uname -r 2.6.32-191.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. /usr/libexec/qemu-kvm .... -vnc :-123 or "-vnc :1023131" Actual results: QEMU 0.12.1 monitor - type 'help' for more information (qemu) for the "-vnc :1023131", we can boot the command line, but can not view the guest via VNC. Expected results: Qemu-kvm should give user a error tip:"vnc port is out of range" Additional info:
Description of problem: scenario 1) qemu-kvm doesn't show any error when user supplies a negative port value to -vnc scenario 2) qemu-kvm doesn't show any error when user supplies a out of range port value to -vnc Actual results: scenario 1)for the "-vnc :-123",we can boot the command line,and can view the guest via VNC. scenario 2)for the "-vnc :1023131",we can boot the command line,but can not view the guest via VNC.
*** Bug 1020611 has been marked as a duplicate of this bug. ***
Not urgent, will be fixed upstream.
http://patchwork.ozlabs.org/patch/300022/
Reproduce this bug using the following version: qemu-kvm-1.5.3-66.el7.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Reproduce: 1. boot vm with "-vnc :-123" # /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio 2. boot vm with "-vnc :1023131" # /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio Results: after step1 and step2, qemu-kvm doesn't quit.
Test this bug using the following version on an intel host: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Test: 1. boot vm with "-vnc :-123" # /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio 2. boot vm with "-vnc :1023131" # /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio Results: after step1, qemu-kvm quits with the error info: (qemu) qemu-kvm: Failed to start VNC server on `:-123': can't convert to a number: -123 after step2, qemu-kvm quits with the error info: (qemu) qemu-kvm: Failed to start VNC server on `:1023131': port 1023131 out of range
Test this bug using the following version on an amd host: qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64 kernel-3.10.0-140.el7.x86_64 Steps to Test: 1. boot vm with "-vnc :-123" # /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio 2. boot vm with "-vnc :1023131" # /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio Results: after step1, qemu-kvm quits with the error info: (qemu) qemu-kvm: Failed to start VNC server on `:-123': can't convert to a number: -123 after step2, qemu-kvm quits with the error info: (qemu) qemu-kvm: Failed to start VNC server on `:1023131': port 1023131 out of range
Test this bug on latest version: Host: # uname -r 3.10.0-144.el7.x86_64 #rpm -q qemu-kvm-rhev qemu-kvm-rhev-2.1.0-2.el7.x86_64 Steps: 1.Boot guest with -vnc :111aaaaa/-vnc :-888/-vnc :aaaasss / Results: QEMU 2.1.0 monitor - type 'help' for more information (qemu) qemu-kvm: Failed to start VNC server on `:aaaasss': can't convert to a number: aaaasss Addtional info: -vnc :22222222 -monitor stdio QEMU 2.1.0 monitor - type 'help' for more information (qemu) qemu-kvm: Failed to start VNC server on `:22222222': port 22222222 out of range According to above test ,this bug fixed
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. https://rhn.redhat.com/errata/RHSA-2015-0624.html