Add this XML to a VM: <graphics type='vnc' port='-1' autoport='yes' websocket='5900'/> Then try to start it: $ sudo virsh start ztester-vnc-f20 error: Failed to start domain ztester-vnc-f20 error: internal error: early end of file from monitor, possible problem: 2016-04-12T21:01:17.196237Z qemu-system-x86_64: -vnc 127.0.0.1:0,websocket=5900: Failed to start VNC server: Failed to bind socket: Address already in use We don't track the static websocket port in the internal port lists, so it isn't checked for collision when allocating the regular VNC port. Regular VNC port is allocated 5900, and the VM fails to start. This commit fixed something similar, so to handle it for websockets we just need to follow this pattern: commit 1a065caa79bb4e42178a9e431ddbe5550a1c0596 Author: Giuseppe Scrivano <gscrivan> Date: Tue Jun 24 13:34:18 2014 +0200 graphics: remember graphics not auto allocated ports
I have tested this again and this is fixed now. Since the bug is 2.5 years old I don't think doing bisect to find the exact commit that fixed this bug is desired. Anyway, I'm closing this one.
commit 1215965a4c4d635014ebb755f9c9181120aa17f2 Author: Nikolay Shirokovskiy <nshirokovskiy> AuthorDate: 2016-11-22 14:09:32 +0300 Commit: John Ferlan <jferlan> CommitDate: 2016-12-09 07:54:34 -0500 qemu: mark user defined websocket as used We need extra state variable to distinguish between autogenerated and user defined cases after auto generation is done. git describe: v2.5.0-61-g1215965a4c contains: v3.0.0-rc1~354