From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7N4y-0007l9-JO for qemu-devel@nongnu.org; Tue, 23 Jun 2015 08:13:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7N4v-0001ix-8A for qemu-devel@nongnu.org; Tue, 23 Jun 2015 08:13:28 -0400 Received: from mail.iv.net.pl ([195.191.233.10]:56330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7N4u-0001ik-Us for qemu-devel@nongnu.org; Tue, 23 Jun 2015 08:13:25 -0400 From: Piotr Rybicki Message-ID: <55894D61.40809@innervision.pl> Date: Tue, 23 Jun 2015 14:13:21 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Bug: vnc + websocket = websocket autoport not working right at live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" , libvir-list Hello. Problem description: When i start qemu via libvirt with vnc websocket defined, it is not possible to live migrate to host where other qemu process is running with the same display id. migration error is: error: internal error: early end of file from monitor: possible problem: [1] => 2015-06-23T11:54:25.590506Z qemu-system-x86_64: -vnc 0.0.0.0:1,websocket=5700,password: Failed to start VNC server on `(null)': Failed to bind socket: Address already in use (please note vnc display id=1 and websocket=5700 - where it should be 5701) in libvirt's xml i have: (...) (...) for first and only qemu process on host, this creates qemu commandline: (...) -vnc 0.0.0.0:0,websocket=5700,password (...) for second qemu process on the same host: (...) -vnc 0.0.0.0:1,websocket=5701,password (...) There is no problem with migration, when there is no websocket configuration. Solution: I believe, to solve this problem, libvirt has to omit websocket port definition in commandline string ('websocket=5700' => 'websocket') when autoport is defined in domain xml definition. from man qemu: -vnc display[,option[,option[,...]]] (...) websocket Opens an additional TCP listening port dedicated to VNC Websocket connections. By definition the Websocket port is 5700+display. If host is specified connections will only be allowed from this host. As an alternative the Websocket port could be specified by using "websocket"=port. TLS encryption for the Websocket connection is supported if the required certificates are specified with the VNC option x509. So if I understand it right, not specifying websocket port means 5700+display id, and display id is given via commandline and increments just fine. Can anyone confirm this? Or perhaps there is some misconfiguration in my xml domain definition? Best regards Piotr Rybicki