qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Xiong Zhou <xzhou@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, libvir-list@redhat.com
Subject: Re: [Qemu-devel] Fail to start 2nd guest
Date: Mon, 27 Feb 2017 13:31:30 +0000	[thread overview]
Message-ID: <20170227133130.GS28403@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170227125003.fegyd7gbrfdvrwjv@XZHOUW.usersys.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2440 bytes --]

On Mon, Feb 27, 2017 at 08:50:03PM +0800, Xiong Zhou wrote:
> On Mon, Feb 27, 2017 at 10:11:04AM +0000, Stefan Hajnoczi wrote:
> > On Mon, Feb 27, 2017 at 05:40:50PM +0800, Xiong Zhou wrote:
> > > It worked fine on Linus tree commit:
> > >   7bb0338 Merge tag 'rodata-v4.11-rc1' of git://git.kernel.org/pub/scm/..
> > > 
> > > failed to start 2nd domain on this commit:
> > > 37c8596 Merge tag 'tty-4.11-rc1' of git://git.kernel.org/pub/scm/..
> > > (this commit probably is not the first bad, i didn't do the bisecting)
> > > 
> > > 
> > > sh-4.2# uname -r
> > > 4.10.0-master-37c8596+
> > > sh-4.2# rpm -qv qemu
> > > qemu-2.0.0-1.el7.6.x86_64
> > > sh-4.2# ps ajxf | grep qemu
> > > ...
> > > sh-4.2# virsh list
> > >  Id    Name                           State
> > > ----------------------------------------------------
> > >  1     73h                            running
> > > 
> > > sh-4.2# virsh start 73us
> > > error: Failed to start domain 73us
> > > error: internal error: qemu unexpectedly closed the monitor: ((null):11497): Spice-Warning **: reds.c:2499:reds_init_socket: listen: Address already in use
> > > 2017-02-27T09:33:42.335708Z qemu-kvm: failed to initialize spice server
> > 
> > The error message says that the spice remote desktop cannot listen on
> > -spice port=5900,addr=127.0.0.1.
> > 
> > Did you hardcode port 5900 in the domain XML?  That could explain why
> No.
> > the second guest fails to launch - you need to use unique port numbers
> > or let libvirt automatically assign them.  Check the domain XML:
> > 
> >   <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
> 
> It looks like:
> 
>     <graphics type='spice' autoport='yes'>
>       <listen type='address'/>
>       <image compression='off'/>
>     </graphics>
> 
> 
> > 
> > Another possibility is that a process running on the host is already
> > using port 5900.  Perhaps a guest or VNC server that was launched
> > outside of libvirt?  You can check this with:
> > 
> >   netstat -alpn | grep 5900
> # netstat -alpn | grep 5900
> tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      11065/qemu-kvm      

Please check that 11065/qemu-kvm was launched by the same libvirtd and
its domain XML also uses autoport='yes'.

I have CCed the libvirt mailing list because they may be able to explain
why there is a collision on TCP port 5900.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2017-02-27 13:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  9:40 [Qemu-devel] Fail to start 2nd guest Xiong Zhou
2017-02-27 10:11 ` Stefan Hajnoczi
2017-02-27 12:50   ` Xiong Zhou
2017-02-27 13:31     ` Stefan Hajnoczi [this message]
2017-02-27 13:38       ` [Qemu-devel] [libvirt] " Peter Krempa

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=20170227133130.GS28403@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xzhou@redhat.com \
    /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).