NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.71k stars 13.84k forks source link

virt-manager: '/usr/libexec/qemu-bridge-helper' is not a suitable bridge helper #34972

Closed davidak closed 1 year ago

davidak commented 6 years ago

Issue description

I configured QEMU/KVM and connect virt-manager via "User session" to start a VM.

The VM has no network connection, so i try to set my ethernet interface as bridge. (I don't know what i'm doing)

screenshot_2018-02-14_19-58-19

Starting the VM fails now with this message:

Error starting domain: '/usr/libexec/qemu-bridge-helper' is not a suitable bridge helper: No such file or directory

Traceback (most recent call last):
  File "/nix/store/xv0z2k1cxi3jgp8kqmksq68gvi1n6sw1-virt-manager-1.4.2/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/nix/store/xv0z2k1cxi3jgp8kqmksq68gvi1n6sw1-virt-manager-1.4.2/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/nix/store/xv0z2k1cxi3jgp8kqmksq68gvi1n6sw1-virt-manager-1.4.2/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
    ret = fn(self, *args, **kwargs)
  File "/nix/store/xv0z2k1cxi3jgp8kqmksq68gvi1n6sw1-virt-manager-1.4.2/share/virt-manager/virtManager/domain.py", line 1489, in startup
    self._backend.create()
  File "/nix/store/s3pr9pb9awj3b0fn1fgrlvqjvycycpqz-libvirt-python-3.6.0/lib/python2.7/site-packages/libvirt.py", line 1062, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: '/usr/libexec/qemu-bridge-helper' is not a suitable bridge helper: No such file or directory

Steps to reproduce

  # hypervisor virtualization
  boot.kernelModules = [ "kvm-intel" ];
  virtualisation.libvirtd.enable = true;

Technical details

davidak commented 6 years ago

Thanks. Is '/usr/libexec/qemu-bridge-helper' is not a suitable bridge helper: No such file or directory an error that should be fixed?

davidak commented 6 years ago

So we let the issue open as "known problem" until someone wants to fix it? Or is there anything we can do easily to have a better user experience (aka don't get cryptic error messages)?

Baughn commented 6 years ago

It's a problem, but what can we use instead?

Not having VMs isn't a useful alternative.

nagisa commented 6 years ago

Adding a

    virtualisation.libvirtd.qemuVerbatimConfig = ''
      bridge_helper = "${pkgs.qemu}/libexec/qemu-bridge-helper"
    ''

seems to not help at all. The file at /var/lib/libvirtd/qemu.conf does get the line in it, but libvirtd itself seems to ignore the configuration entirely and still insists on using /usr/libexec/qemu-bridge-helper

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
atisharma commented 2 years ago

Still a problem on 22.05.

st8ed commented 2 years ago

Adding lines suggested above and manually restarting libvirtd service seems to temporarily fix the issue for me.

    virtualisation.libvirtd.qemuVerbatimConfig = ''
      bridge_helper = "${pkgs.qemu}/libexec/qemu-bridge-helper"
    ''

However problem arises again after host restart, and a manual restart of libvirtd service is necessary. I use libvirtd running as a user-space daemon (qemu://session). Haven't yet investigated the issue any further.

mfenniak commented 1 year ago

This seems to be fixed by the already-merged #187211, which I assume should be in upcoming NixOS 22.11. It's working for me on unstable.