Skip to content

virt-manager: can't detect default hypervisor nor setting one #42433

Closed

Description

@bricewge

virt-manager always start with a warning message:

Could not detect a default hypervisor. Make sure the appropriate virtualization packages containing kvm, qemu, libvirt, etc. are installed and that libvirtd is running.

So each time I start it I need to manually add a connection which annoy me. To avoid that I would like that it either automatically find an hypervisor or specifying my default hypervisor somewhere; both behavior that virt-manger should do on any distro but that's not the case for NixOS.

I tried the following without any successful results:

  • export LIBVIRT_DEFAULT_URI="qemu:///system"
  • adding LIBVIRT_DEFAULT_URI="qemu:///system" environment to libvirtd.service
  • adding the line uri_default = "qemu:///system" to:
    • /etc/libvirt/libvirt.conf
    • /var/lib/libvirt/libvirt.conf
    • /var/lib/libvirt/libvirtd.conf
    • ~/.config/libvirt/libvirt.conf
    • ~/.config/libvirt/libvirtd.conf

For sure I can start it like this virt-manager --connect qemu:///system but that's only a workaround.

Activity

  1. emmanuelrosa commented on Jun 23, 2018

    @emmanuelrosa
    Contributor

    What's the procedure for reproducing this error?

  2. bricewge commented on Jun 23, 2018

    @bricewge
    ContributorAuthor

    I think the minimal setup you need is:

    virtualisation.libvirtd.enable = true;
    environment.systemPackages = [ pkgs.virtmanager ]; 
    

    And then just start virt-manager.

  3. bricewge commented on Jun 24, 2018

    @bricewge
    ContributorAuthor

    Thanks @volth! WIth dconf, virt-manager now remember the last connection and don't display the warning message at startup anymore.

  4. jtojnar commented on Sep 8, 2018

    @jtojnar
    Member

    gnome3.dconf is a system service that needs to be added to services.dbus.packages by your desktop environment. If you create your own environment, you will need to add it yourself (adding programs.dconf.enable = true; to configuration.nix should work). Nix does not contain a mechanism for representing a dependency on a service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions