* VNC server for KVM VM
@ 2009-08-14 20:58 Daniel Bareiro
2009-08-14 21:28 ` Charles Duffy
2009-08-14 22:12 ` Anthony Liguori
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Bareiro @ 2009-08-14 20:58 UTC (permalink / raw)
To: KVM General
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
Hi all!
I'm using the following syntax to launch a VM:
$KVM -hda ${DISK_PATH}/aprender00-raiz -hdb ${DISK_PATH}/aprender00-space \
-m 3584 -boot c -smp 4 -net nic,vlan=0,macaddr=00:16:3e:00:00:61,model=virtio \
-net tap -daemonize -vnc :3 -k es -localtime -monitor \
telnet:localhost:4003,server,nowait -serial telnet:localhost:4043,server,nowait
But when I doing a shutdown logged on the VM, apparently the port
associated to VNC server remains active when trying boot it again:
inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use
inet_listen: FAILED
I'm using KVM-88 compiled by myself. It can be a bug?
Thanks in advance.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Squeeze - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: VNC server for KVM VM
2009-08-14 20:58 VNC server for KVM VM Daniel Bareiro
@ 2009-08-14 21:28 ` Charles Duffy
2009-08-14 22:13 ` Anthony Liguori
2009-08-15 0:38 ` Daniel Bareiro
2009-08-14 22:12 ` Anthony Liguori
1 sibling, 2 replies; 5+ messages in thread
From: Charles Duffy @ 2009-08-14 21:28 UTC (permalink / raw)
To: kvm; +Cc: daniel-listas
Daniel Bareiro wrote:
> inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use
> inet_listen: FAILED
If you check with netstat, I expect you'll see the port in TIME_WAIT
state; if so, this will eventually clean itself up if you just wait a
little bit before restarting.
One option to avoid it is to make sure all connections are closed
properly on shutdown; another is to set the SO_REUSEADDR flag on the
socket before the bind() call.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: VNC server for KVM VM
2009-08-14 21:28 ` Charles Duffy
@ 2009-08-14 22:13 ` Anthony Liguori
2009-08-15 0:38 ` Daniel Bareiro
1 sibling, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2009-08-14 22:13 UTC (permalink / raw)
To: Charles Duffy; +Cc: kvm, daniel-listas
Charles Duffy wrote:
> Daniel Bareiro wrote:
>> inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use
>> inet_listen: FAILED
>
> If you check with netstat, I expect you'll see the port in TIME_WAIT
> state; if so, this will eventually clean itself up if you just wait a
> little bit before restarting.
>
> One option to avoid it is to make sure all connections are closed
> properly on shutdown; another is to set the SO_REUSEADDR flag on the
> socket before the bind() call.
We set SO_REUSEADDR.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: VNC server for KVM VM
2009-08-14 21:28 ` Charles Duffy
2009-08-14 22:13 ` Anthony Liguori
@ 2009-08-15 0:38 ` Daniel Bareiro
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Bareiro @ 2009-08-15 0:38 UTC (permalink / raw)
To: kvm
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
On Friday, 14 August 2009 16:28:00 -0500,
Charles Duffy wrote:
> >inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use
> >inet_listen: FAILED
>
> If you check with netstat, I expect you'll see the port in TIME_WAIT
> state; if so, this will eventually clean itself up if you just wait a
> little bit before restarting.
>
> One option to avoid it is to make sure all connections are closed
> properly on shutdown; another is to set the SO_REUSEADDR flag on the
> socket before the bind() call.
Two were the VM to which I did shutdown and later I boot again. These VM
had VNC servers running in 5902 and 5903. Approximately three hours of
boot, I see the following thing with netstat:
root@ss03:~# netstat -puta | grep 590
tcp 0 0 localhost:5900 *:* LISTEN 7332/qemu-system-x8
tcp 0 0 *:5901 *:* LISTEN 17528/qemu-system-x
tcp 0 0 localhost:5902 *:* LISTEN 30889/qemu-system-x
tcp 0 0 localhost:5903 *:* LISTEN 30900/qemu-system-x
Now 5900 and 5901 are the ports that these two machines have assigned. It
are up and running.
Also I have other two VM without shutdown/boot it with associated VNC ports
5904 and 5905, but that don't appear in the listing of netstat, as you can
see. Testing of connection I see that I cannot be connected to any of them
using VNC client, although I don't remember to have observed some error
when launching the KVM processes of each of them, which draws attention to
me.
Thanks for your reply.
Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Squeeze - Linux user #188.598
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: VNC server for KVM VM
2009-08-14 20:58 VNC server for KVM VM Daniel Bareiro
2009-08-14 21:28 ` Charles Duffy
@ 2009-08-14 22:12 ` Anthony Liguori
1 sibling, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2009-08-14 22:12 UTC (permalink / raw)
To: dbareiro, KVM General
Daniel Bareiro wrote:
> Hi all!
>
> I'm using the following syntax to launch a VM:
>
> $KVM -hda ${DISK_PATH}/aprender00-raiz -hdb ${DISK_PATH}/aprender00-space \
> -m 3584 -boot c -smp 4 -net nic,vlan=0,macaddr=00:16:3e:00:00:61,model=virtio \
> -net tap -daemonize -vnc :3 -k es -localtime -monitor \
> telnet:localhost:4003,server,nowait -serial telnet:localhost:4043,server,nowait
>
>
> But when I doing a shutdown logged on the VM, apparently the port
> associated to VNC server remains active when trying boot it again:
>
> inet_listen: bind(ipv4,0.0.0.0,5903): Address already in use
> inet_listen: FAILED
>
I expect the qemu process enver expected.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-15 0:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 20:58 VNC server for KVM VM Daniel Bareiro
2009-08-14 21:28 ` Charles Duffy
2009-08-14 22:13 ` Anthony Liguori
2009-08-15 0:38 ` Daniel Bareiro
2009-08-14 22:12 ` Anthony Liguori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.