Hi George,
there are a few such settings for the service:
/etc/libvirt/libvirtd.conf - for general detection of dead clients to libvirtd
/etc/libvirt/qemu.conf - for qemu migrations (not related here)
/etc/libvirt/libxl.conf - as above for Xen (not related here)

But there are not one but two settings in each of them:
/etc/libvirt/libvirtd.conf:#keepalive_interval = 5
/etc/libvirt/libvirtd.conf:#keepalive_count = 5

By default the config is disabled, but important is that this is no just
"5 seconds" but instead quoting: "In other words, the connection is
automatically closed approximately after  keepalive_interval *
(keepalive_count + 1) seconds since the last message received from the
client"

I checked the code, the defaults are really 5/5 - not just a .conf comment 
missing to be updated.
That would be ~30 seconds, so much more than the 5 you mentioned.

Virsh defaults to interval 5 count 6 in its code.
So it is even more patient.

Then this is NOT a timeout like:
- 5 is set in client, so if nothing appears in 5 seconds die
- 5 is set in server, so send after 5
- since the msg from the server arrives slightly after 5 it dies

Instead it will be:
- every 5 sec it will send a keepalive msg
- if there is no response in 5*(5+1) seconds then kill the connection
- this is done from client and server independently

All that does not mean your case is invalid, but maybe the real root
cause and solution is slightly different?.

Some questions:
1. I don't fully get "trying to use virsh console, virsh edit you will get the 
following".
   I was able to run virsh console on one terminal and virsh edit on another to 
the same guest 
   without any issues.
   Could you outline the exact commands you use to see the issue?
2. Which release are you on - maybe I checked the wrong sources for your case
   $ cat /etc/os-release
   $ dpkg -l '*libvirt*' '*qemu*'
3. Did you change the timout in the config file I mentioned and then it works 
for you?

In general the default configs are taken from upstream wherever possible, so in 
this case.
Which means eventually if we want/need to change them we will discuss that 
there - but lets clarify the case a bit before going there.

** Changed in: libvirt (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1730051

Title:
  keepalive_timeout in libvirtd.conf is causing virsh to disconnect

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1730051/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to