Bug 1257850 - qemu-kvm started failed with websocket enable (vnc)
qemu-kvm started failed with websocket enable (vnc)
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
: Regression
Depends On:
  Show dependency treegraph
Reported: 2015-08-28 05:05 EDT by jingzhao
Modified: 2016-03-28 05:23 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-09-03 03:19:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jingzhao 2015-08-28 05:05:31 EDT
Description of problem:
qemu-kvm started failed with websocket enable

Version-Release number of selected component (if applicable):
Host kernel version:3.10.0-309.el7.x86_64
Guest kernel version:2.6.18-398.el5

How reproducible:

Steps to Reproduce:
1.Boot guest with cli:
/usr/libexec/qemu-kvm \
-M pc \
-cpu IvyBridge \
-nodefaults -rtc base=utc -no-hpet \
-m 2G \
-smp 4,sockets=2,cores=2,threads=1 \
-enable-kvm \
-name rhel7.2 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-monitor stdio \
-qmp tcp:0:6661,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-serial unix:/tmp/serial0,server,nowait \
-vga cirrus \
-vnc :0,websocket \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=54:52:00:B6:40:21 \
-drive file=/usr/test/guest1.img,if=none,media=disk,id=drive-ide1,format=raw \
-device ide-drive,bus=ide.0,unit=1,drive=drive-ide1,id=ide1,bootindex=1 \
-chardev socket,id=seabios,path=/tmp/seabios,server,nowait \
-device isa-debugcon,chardev=seabios,iobase=0x402 \
-usb \
-device usb-tablet,id=tablet0 \

Actual results:
qemu-kvm started failed 

(qemu) qemu-kvm: -vnc :0,websocket: Failed to start VNC server on `(null)': address resolution failed for :on: Servname not supported for ai_socktype

Expected results:
qemu-kvm started successfully

Additional info:
Qemu-kvm started with qemu-kvm-rhev-2.1.2-16.el7 successfully
Comment 3 Gerd Hoffmann 2015-09-03 03:19:00 EDT
The correct syntax is "-vnc :0,websocket=<portnr>".

Older qemu versions accept websocket without portnr too and use the hard-coded port 5700 then.  Which is not very useful (stops working as soon as you try to start a second guest on the same machine).  And as far I know we don't have anything depending on that behavior, libvirt always explicitly passes the port.

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