Run virt-manager on Windows 10



  • Trying to run virt-manager and Getting the following error:

    root@DESKTOP-A911GSS:~# Unable to init server: Could not connect: Connection refused
    Unable to init server: Could not connect: Connection refused
    (virt-manager:28): Gtk-WARNING **: 18:58:22.746: cannot open display:

    I've followed the steps and no luck.



  • @brandon220 said in Run virt-manager on Windows 10:

    Trying to run virt-manager and Getting the following error:

    root@DESKTOP-A911GSS:~# Unable to init server: Could not connect: Connection refused
    Unable to init server: Could not connect: Connection refused
    (virt-manager:28): Gtk-WARNING **: 18:58:22.746: cannot open display:

    I've followed the steps and no luck.

    You have Xming running?



  • OK so got a connection but got a few other problem.
    First one was i got this.

    Unable to connect to libvirt.

    You need to install openssh-askpass or similar to connect to this host.

    Solved by running this sudo virt-manager --no-fork

    Or a permanent solution was to run sudo apt-get install ssh-askpass ssh-askpass-gnome



  • My next issue/question

    Once in Virt-Manager i can add my KVM host and connect. It asks for my users password twice? Should it?

    Then once on (i've already got some VM's on there) when i click on a VM and open the console it asks for the password 5-6 times before displaying the console/desktop.



  • @hobbit666 use SSH key authentication to avoid having to enter a username and password.



  • @black3dynamite Yeah did think that, but thought mention it here in-case someone else gets the issue



  • @scottalanmiller

    You have Xming running?

    Yes, it should be. Shows the icon in the taskbar after I "opened it".



  • @hobbit666 said in Run virt-manager on Windows 10:

    OK so got a connection but got a few other problem.
    First one was i got this.

    Unable to connect to libvirt.

    You need to install openssh-askpass or similar to connect to this host.

    Solved by running this sudo virt-manager --no-fork

    Or a permanent solution was to run sudo apt-get install ssh-askpass ssh-askpass-gnome

    OK so after playing and re-insyalling from scratch on both the KVM host and Ubuntu on my machine. This is because i'm running everything as root ... oops.

    So added a "user" to the KVM while i was installing and now when i use Virt-Manager we are all good.
    Also as @black3dynamite suggested i've generated a SSH key and now i can just connect and go.

    However i did get a error when creating the connection on Virt-Manager using the "users" account
    authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

    This was solved by adding the user on the KVM host to the libvirt group.



  • Also i was finding that when i closed Virt-Manager on the Windows machine, then came back later the connection was lost and i had to re-add the connection and delete the default one that keeps coming back.

    This was solved by running sudo apt-get install dbus-x11 on ubuntu

    Now when i reboot my Windows machine and re-open virt-manager the default is gone and my KVM connects automatically 🙂



  • @hobbit666 said in Run virt-manager on Windows 10:

    OK so got a connection but got a few other problem.
    First one was i got this.

    Unable to connect to libvirt.

    You need to install openssh-askpass or similar to connect to this host.

    Solved by running this sudo virt-manager --no-fork

    Or a permanent solution was to run sudo apt-get install ssh-askpass ssh-askpass-gnome

    Oh, that's because you didn't set up your SSH keys. That's not part of virt-manager, just part of your OS. Do that and you never get that message and connections are automatic and instant.



  • @hobbit666 said in Run virt-manager on Windows 10:

    My next issue/question

    Once in Virt-Manager i can add my KVM host and connect. It asks for my users password twice? Should it?

    Then once on (i've already got some VM's on there) when i click on a VM and open the console it asks for the password 5-6 times before displaying the console/desktop.

    No, use keys and it never asks at all.



  • This post is deleted!


  • @hobbit666 said in Run virt-manager on Windows 10:

    Having a few issues getting this running.

    1. So i've installed Xming.
      Set the Display and Ran the program.

    2. Gone to the Windows Store and installed Ubuntu 18.04

    3. Ran Ubuntu and done and ap-get update
      Then apt-get install virt-manager

    4. ran virt-manager &

    This is where i get the first problem.
    I get the following message:-
    2019-04-26 10_13_12-Window.png

    Do i need to install or run anything else on the Windows Ubuntu instance?

    To avoid seeing that message, you can do this instead.

    virt-manager --connect=qemu+ssh://user@kvmhost/system &
    


  • Why Virt-manager over Hyper-V? For Windows 10 Home users?



  • @kamidon said in Run virt-manager on Windows 10:

    Why Virt-manager over Hyper-V? For Windows 10 Home users?

    It’s about managing KVM hosts.