Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Virt-manager fails with packet bytes received from server too large

Recently, I had some problems connecting to one of my libvirt qemu hosts. When I ran virt-manager from my desktop which uses a qemu+ssh://root@vm3 connection with ssh key, I got this error:

Unable to connect to libvirt qemu+ssh://root@vm3/system.

packet 167772156 bytes received from server too large, want 33554432

Verify that the 'libvirtd' daemon is running on the remote host.

Libvirt URI is: qemu+ssh://root@vm3/system

Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open self._backend.open(cb, data) File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open conn = libvirt.openAuth(self._open_uri, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/libvirt.py", line 147, in openAuth raise libvirtError('virConnectOpenAuth() failed') libvirt.libvirtError: packet 167772156 bytes received from server too large, want 33554432

After a lot of searching the Interwebs, I have learned the problem. It was hilarious and pointless.

I confirmed my ssh key still lets me ssh to root@vm3. (So sue me)

I confirmed libvirt is indeed running on the host (systemctl status -l libvirt) and noticed I had a bad image path, to a BSD/ directory I must have deleted on my network share. So I fixed that (already forgot the command but was probably virt edit-pool or something), but that didn't fix my issue today.

I logged to my good host (vm1) and bad host (vm3) just to tty and saw there's an additional newline when I log in to vm3. So I traced that down. In my .bashrc there was a command to run my "bash profile" /usr/bin/bp which I install via OS package on every system of mine. There's no reason it should be printing a newline. I had to set verbosity very high.

I eventually found that because file /var/spool/mail/root exists on vm3, it was printing the undefined variable $MAILMSG, and echo always throws in a newline.

Now, my root mail spool hasn't been updated since 2018, so I've had the one error message about something lame sitting there for 6 years, but it was only just now that virt-manager on Devuan Ceres fails to connect.

I'm guessing it has something to do with a newer version of virt-manager and older (unsupported now, apparently) version of libvirt on CentOS 7.

Comments