89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.9k stars 405 forks source link

libvirt + virt-manager setup doesnt connect anymore #1046

Closed secretmango closed 7 months ago

secretmango commented 11 months ago

Thanks for your guide on how to setup a rootful container with qemu and another container with virt-manager. I did that, added ksshaskpass to the virt-manager container for password auth, set the root password in the qemu rootful container and it worked.

But now, weirdly, after reboot it doesnt work anymore?

I have a Desktop entry that launches the rootful container, requires sudo privileges. libvirtd and sshd should run.

I already tried using user "qemu" in the libvirt root container, and adding "qemu" to the "libvirt" group for enhanced permission isolation, and setting the qemu user password accordingly and re-creating the connection, entering the new password.

But in virt-manager I get:

Unable to connect to libvirt qemu+ssh://qemu@127.0.0.1:2222/system.

packet 1416128879 bytes received from server too large, want 33554432

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

Libvirt URI is: qemu+ssh://qemu@127.0.0.1:2222/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/lib64/python3.12/site-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: packet 1416128879 bytes received from server too large, want 33554432

The setup is with your guide, an almalinux rootful container and a Fedora39 container for virt-manager and ksshaskpass. It already worked, but now not anymore?

Libvirtd and sshd are now running, libvirtd was dead

89luca89 commented 7 months ago

I've updated the guide with a more reliable setup now

secretmango commented 7 months ago

thanks you are awesome!