How to correcly configure libvirt/qemu KVM hypervisor to accept virt-manager client

centos7kvm-virtualization

I've got a CentOS 7 server KVM with 2 virtual machines running on it. I've been using virt-manager remotely for a couple of weeks without problems… Until yesterday when it froze and I could not connect to the server anymore.
I get the following error message:

Cannot connect to libvirt
packet 458961001 bytes received from server too large, want 16777216
ibvirt URI is: qemu+ssh://root@[IP]/system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1020, in _open_thread
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 158, in open
    open_flags)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: packet 458961001 bytes received from server too large, want 16777216

Virtual Manager connection is qemu+ssh://root@[IP]/system

I don't know why this started to happen. I tried restarting the libvirtd daemon, the VMs and the server itself but the error is still there. I've also tried from another client PC but nothing…

I googled it but I couldn't find a solution 🙁

What am I doing wrong?

Best Answer

I finally found why this happened! It was my fault, because I added some code to execute when starting an ssh connection in .bashrc file, and that was the large answer received by virt-manager.

Related Topic