I setup KVM on a remote host, and have a few .iso files out there that I want to play with.

I setup Virt-manager initially on a Ubuntu-mate 15.10 machine, and it seemed to work fine (slow as heck starting the virtual machines) but worked.

Now, I'm trying to do the same with virt-manager from my Ubuntu 16.04 install, and first out of the gate I got a message that I needed ssh-askpass-gnome to be prompted for the password, so I installed it.

Now, when I start the Virt-Manager GUI monitor, it continuously prompts me for my SSH password, and the virtual machine never gets booted? Shouldn't it be booting "headless" when I run it without the monitor anyway?

So, 2 questions to clarify?

  1. why does it keep prompting for my ssh password? I know some people say use keys, but seriously...for new users like me, shouldn't the username password thing work on ssh for playing around?

  2. Why doesn't the VM boot "headless" before the monitor even starts?


BTW - I do have it set to use VNC over Spice...just in case anyone thought that might be the issue.

  • I only have half our answer, install "ssh askpass", you will find it in Ubuntu software app, just search for ask, the icon is a puffer fish. It will remember your password for you, make sure you type "yes" when it asks to save the SSH key. I have a kvm server that I connect to via my normal workstation using this. – Christopher Angulo-Bertram Jun 2 '16 at 15:11
  • Excellent - I'll give it a try. I installs ssh-askpass-gnome, but it never asks me to remember the SSH key. – bmcgonag Jun 2 '16 at 15:59
  • It should ask when you make the connection from virtmanager to your KVM. – Christopher Angulo-Bertram Jun 2 '16 at 16:03
  • @ChristopherAngulo-Bertram I checked, and when I click to open / run the VM, I get the password prompt, but theres nothing to check to say save, and it never asks me to save it. – bmcgonag Jun 2 '16 at 17:48
  • Shut down the guest machine.
  • In the 'Display' section, select All interfaces instead of 'Only localhost'.
  • Restart the guest machine
  • 1
    This solution can only be regarded as a solution for a desktop environment. Perhaps it would best be paired with copying RSA key for user in a network environment. Would be interesting to test whether ssh-keygen for user in libvirt group would alleviate the issue in a desktop environment, too - I cannot say, since I only use VMM over a network. – AveryFreeman Jul 12 '18 at 17:30

So, I'm a bit of an idiot I guess. I found a different place to set the VNC vs. Spice setting. Not sure why it's in 2 places.

But, to help those trying to find it, should any others fall into what I did, when you start the Monitor (to see the UI), then you'll want to click the 'i' button in the circle on that window.

Then find 'Display' in the left pane, and from there, select VNC. Now shutdown, and restart the VM session, and you should be ok.

  • Does this mean you are good now, or are you still gettng asked for your password? BTW you only get asked for it when you connect to the server, and of course when you log on to your server. SSH Passkey won't ask you to save anything exactly, when you log on to the SSH client, you will be asked for the password to make the connection, it does this in terminal as well, if it is the first time you have logged on to this SSH, it will ask you to type YES to save the key, it may ask for your password once again. The next time you log on you will only have to put the password in, just like term. – Christopher Angulo-Bertram Jun 2 '16 at 22:45
  • 1
    I am good now. Basically with Spice selected in the window where the desktop would be viewed (viewer I suppose), you click the 'i' in the circle, and there are a bunch of options. This is where Spice was still selected. Once I switched to VNC, it stopped continuously prompting me for my password. Not sure why Spice does it. – bmcgonag Jun 8 '16 at 20:26
  • 1
    In the setting of the VM, under Spice and VNC there is an option for all ports. I have found if I do not choose all ports I have issues, at least with Spice. – Christopher Angulo-Bertram Jun 8 '16 at 21:00
  • Choosing one protocol over another because of inadquate permissions is not a good solution - copying the RSA key for the user is the correct solution. – AveryFreeman Jul 12 '18 at 17:25

I have the same trouble. In order to resolve it:

  1. Run ssh-copy-id <your kvm server>.

    In my case, from my laptop: ssh-copy-id hypervisor@IP_OF_MY_UBUNTU_SERVER_RUN_KVM

  2. Now when I connect to virt-manager it doesn't ask for a password and when I want view the GUI console I can without any password request.

  • This is the correct solution, and should be regarded as such even though it is on the bottom of the page. The only discrepancy is that others are using VMM in a single-desktop environment. Perhaps one should attempt using rsa-keygen for user(s) in libvirt group to see if it repairs the issue in that environment, too. Unfortunately, I can't try it since I only use VMM over a network, but it stands to reason that it would likely work - ssh-askpass wants an RSA key (certainly makes sense in my mind). – AveryFreeman Jul 12 '18 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.