qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Piotr Rybicki <piotr.rybicki@innervision.pl>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	libvir-list <libvir-list@redhat.com>
Subject: [Qemu-devel] Bug: vnc + websocket = websocket autoport not working right at live migration
Date: Tue, 23 Jun 2015 14:13:21 +0200	[thread overview]
Message-ID: <55894D61.40809@innervision.pl> (raw)

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:
(...)
     <graphics type='vnc' port='-1' autoport='yes' websocket='-1' 
listen='0.0.0.0' passwd='xxx'>
       <listen type='address' address='0.0.0.0'/>
     </graphics>
(...)

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

             reply	other threads:[~2015-06-23 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 12:13 Piotr Rybicki [this message]
2015-06-25 20:00 ` [Qemu-devel] [libvirt] Bug: vnc + websocket = websocket autoport not working right at live migration Martin Kletzander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55894D61.40809@innervision.pl \
    --to=piotr.rybicki@innervision.pl \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).