Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 989848 - qemu should give friendly prompt when specify invalid vnc port value
Summary: qemu should give friendly prompt when specify invalid vnc port value
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-30 04:24 UTC by Sibiao Luo
Modified: 2013-08-01 23:36 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 23:36:29 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sibiao Luo 2013-07-30 04:24:30 UTC
Description of problem:
If specify invalid vnc port value in qemu-kvm command line, the qemu should quit with friendly prompt. Also tried the spice that has no such issue.

Version-Release number of selected component (if applicable):
host info:
2.6.32-402.el6.x86_64
qemu-kvm-0.12.1.2-2.381.el6.x86_64
seabios-0.6.1.2-28.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
...-vnc host:display
If you do not specify host, connections will be accepted from any host, The TCP port on which the VNC session is then running is normally a 5900 + display number.  

1.# /usr/libexec/qemu-kvm -vnc :aaaa -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:5900
        auth: none
Client: none
(qemu) q

2.# /usr/libexec/qemu-kvm -vnc :99999999999 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:65291
        auth: none
Client: none
(qemu) q

3.# /usr/libexec/qemu-kvm -vnc :-10 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:5890
        auth: none
Client: none
(qemu) q

4.# /usr/libexec/qemu-kvm -vnc :-999 -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info vnc
Server:
     address: 0.0.0.0:4901
        auth: none
Client: none
(qemu) 
5.# /usr/libexec/qemu-kvm -vnc :-9999 -monitor stdio
Failed to start VNC server on `:-9999': address resolution failed for :-4099: Servname not supported for ai_socktype

Actual results:


Expected results:
Qemu should quit with a friendly prompt, like:
for step 1, qemu quit with prompt: Parameter 'port' expects a number
for step 2, qemu quit with prompt: -vnc port value is out of range
...

Additional info:
Also tried the spice, testing as following.
# /usr/libexec/qemu-kvm -spice port=999999999,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=aaaa,disable-ticketing -monitor stdio
qemu-kvm: -spice port=aaaa,disable-ticketing: Parameter 'port' expects a number
parse error: port=aaaa,disable-ticketing
 
# /usr/libexec/qemu-kvm -spice port=-9999,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=-1,disable-ticketing -monitor stdio
spice port is out of range

# /usr/libexec/qemu-kvm -spice port=0,disable-ticketing -monitor stdio
neither port nor tls-port specified for spice.

# /usr/libexec/qemu-kvm -spice port=1,disable-ticketing -monitor stdio
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) info spice
Server:
     migrated: false
     address: 0.0.0.0:1
        auth: none
Channels: none
(qemu) q

Comment 2 Ademar Reis 2013-08-01 23:36:29 UTC
corner case, not a customer issue, so WONTFIX for RHEL6 (there's already a bug for RHEL7: bug 733600).


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