From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8DJn-0002TP-C6 for qemu-devel@nongnu.org; Thu, 25 Jun 2015 16:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8DJm-0005qh-7T for qemu-devel@nongnu.org; Thu, 25 Jun 2015 16:00:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8DJm-0005qT-0J for qemu-devel@nongnu.org; Thu, 25 Jun 2015 16:00:14 -0400 Date: Thu, 25 Jun 2015 22:00:11 +0200 From: Martin Kletzander Message-ID: <20150625200011.GD5089@wheatley> References: <55894D61.40809@innervision.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aVD9QWMuhilNxW9f" Content-Disposition: inline In-Reply-To: <55894D61.40809@innervision.pl> Subject: Re: [Qemu-devel] [libvirt] Bug: vnc + websocket = websocket autoport not working right at live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Piotr Rybicki Cc: libvir-list , "qemu-devel@nongnu.org" --aVD9QWMuhilNxW9f Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Tue, Jun 23, 2015 at 02:13:21PM +0200, Piotr Rybicki wrote: >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: >(...) > listen='0.0.0.0' passwd='xxx'> > > >(...) > >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. > Well, either that or increasing the websocket number as well. And that port should be auto-allocated so in case there is something listening on port 5701 it can select 5702. That would be even more error-proof and libvirt would retain full control of qemu (we do that so that in case the 'websocket = display + 5700' default gets changed, we still know all the details we set up). >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? > I believe this is a bug in libvirt. Would you mind creating a bug in bugzilla for this issue so we can properly track the issue? Thanks, Martin >Best regards >Piotr Rybicki > >-- >libvir-list mailing list >libvir-list@redhat.com >https://www.redhat.com/mailman/listinfo/libvir-list --aVD9QWMuhilNxW9f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVjF3KAAoJEAgfwp8kF4bdU/QP/iez3Nds2rp2c//e7qLOniX0 2BR6PcSviodkSnty48BWt4MadFv3JRvI89p6mZDq4Dzz6jcljQCAaaxrD+lxyRHu LKB5Z/Jp3pgWGBavl3/T4XB7VeXNsil3L/nLFpW4+aWExPpVLjBBbv5cDMZcfu5m pz2GY3rZuNW1s9xh+1Epqt9kRorPi8kWmzLakV+Sv4khFtZjSJeftkU78QSEufBS uy02MBW+Zznvd9e8TofO/gAG3RhWfoOZigdWBn1j/p/nLBzqvjmy9ojctVSQNFWD sFUx5kH0FCY3tUQ2BzjY6RoZHK8eZHulA5FnS6wIPzEFuEZS400fR3tNZaNy681o iL0dY/g3avQuiz2n6+xgvUhLjVGehfCuwiQZcxsD9YjIDJV/288FX4EfpH8tesil jUvAf6mqnpClxv6LuxzucujcJpeCZEthnM3ockAGZdHbJpRWmrYb/qYyvR1GZa9e ZhjvT5fRbskum6J//JoFmZYkE6lrwZwEAfKdlMhy7b077RcE1K+plAiz8WQcI5gI oC0Ka9Z3nl5NYSE3zgP1tM6v8RJB4MJsrBU+C06bs/nJyUXT23MYOg8U9gqMyZ+r cWH6xNCvTZ2WoekF6s7qRC4+Ql81FQGB7q0uxoOhqAVHl+8zfLZBeT1DE1WkRgjw Q+66kv07+lQPgsTSl5di =MkS0 -----END PGP SIGNATURE----- --aVD9QWMuhilNxW9f--