[HowTo] Run OMV as a KVM/qemu/libvirt host

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Have you checked that the username you are connecting with are member of the correct groups on the host?

      Source Code

      1. sudo adduser <username> libvirt
      2. sudo adduser <username> kvm


      What happens if you try to access libvirt from a console on the host like::

      Source Code

      1. virsh list --all

      It should list like this:

      Brainfuck Source Code

      1. username@LHJ-OMV:~$ virsh list --all
      2. Id Name State
      3. ----------------------------------------------------
      4. username@LHJ-OMV:~$


      Also check that the libvirt deamon is running on the host:

      Source Code

      1. ps -A | grep virt

      it should display:

      Source Code

      1. 1912 ? 00:04:06 libvirtd
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      User name was added to both groups.

      virsh list --all gives same response that you have shown.

      ps -A | grep virt gives me::

      Source Code

      1. 18321 ? 00:00:00 libvirtd


      Does it look like a problem with libvirtd, or is it likely some other connection problem?

      Also when I first tried connecting, it said that I needed openssh-askpass or something similar. I installed ssh-askpass. Before that, it wouldn't even ask for a password.
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      The complete message I am getting is:

      Source Code

      1. Unable to connect to libvirt.
      2. End of file while reading data: sh: nc: not found: Input/output error
      3. Verify that the 'libvirtd' daemon is running
      4. on the remote host.
      5. Libvirt URI is: qemu+ssh://radio@192.168.1.151/system
      6. Traceback (most recent call last):
      7. File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
      8. self.vmm = self._try_open()
      9. File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
      10. flags)
      11. File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
      12. if ret is None:raise libvirtError('virConnectOpenAuth() failed')
      13. libvirtError: End of file while reading data: sh: nc: not found: Input/output error
      Display All
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Are the account/username you are using to connect to the host member of the ssh group. If not grant membership by

      Source Code

      1. adduser <username> ssh

      Check the membership of the groups on the host:

      Source Code

      1. cat /etc/group | grep libvirt
      2. cat /etc/group | grep kvm
      3. cat /etc/group | grep ssh

      The account you are using should be member of all three groups

      I presume that you have not defined any virtual guests on your host since they should have been shown in the

      Source Code

      1. virsh list --all


      If you have defined any the result should be like:

      Brainfuck Source Code

      1. root@LHJ-OMV:~# virsh list --all
      2. Id Name State
      3. ----------------------------------------------------
      4. 5 Wheezy-mail running
      5. - Ubu_serv_20_04 shut off
      6. - Wheezy-basis shut off


      What is the result if you try to connect from CLI on your admin pc:

      Source Code

      1. virsh -c qemu+ssh://<username>@<ipadress_of_host>/system list --all
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      This is the result, I am using the username radio for qemu.

      Source Code

      1. Last login: Wed Oct 23 11:36:26 2013 from stuart-desktop
      2. root@openmediavault:~# cat /etc/group | grep libvirt
      3. libvirt:x:118:admin,root,radio
      4. libvirt-qemu:x:119:libvirt-qemu
      5. root@openmediavault:~# cat /etc/group | grep kvm
      6. kvm:x:117:admin,root,radio
      7. root@openmediavault:~# cat /etc/group | grep ssh
      8. ssh:x:107:stuart,radio


      Brainfuck Source Code

      1. root@openmediavault:~# virsh list --all
      2. Id Name State
      3. ----------------------------------------------------


      The result of

      Source Code

      1. virsh -c qemu+ssh://<username>@<ipadress_of_host>/system list --all
      is

      Source Code

      1. root@stuart-desktop:/home/stuart# virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      2. WARNING: gnome-keyring:: couldn't connect to: /home/stuart/.cache/keyring-2Eh4T5/pkcs11: No such file or directory
      3. radio@192.168.1.151's password:
      4. error: End of file while reading data: sh: nc: not found: Input/output error
      5. error: failed to connect to the hypervisor
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Have you created the "radio" user in OMV GUI? If so the user does not have a home dir and all the nescesary files as OMV GUI only creates users with the absolute minimum parts.
      You have to create the "radio" user in the CLI
      First delete the user in OMV GUI.
      Then login in to the console with "root" and create the user like:

      Source Code

      1. adduser radio

      Answer the questions asked.
      After this make the "radio" user member of the "ssh" group with:

      Source Code

      1. useradd radio ssh

      Check the "radio" users by loggin in the "radio" user

      Source Code

      1. su radio
      Enter password. Logout from the console.

      Then try to connect via the Virt-manager from you desktop pc with "radio" as the user.
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I have now done that. As you will see below, it now asks for the password three times, and then...

      Source Code

      1. radio@openmediavault:/root$ virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      2. radio@192.168.1.151's password:
      3. radio@192.168.1.151's password:
      4. radio@192.168.1.151's password:
      5. error: Cannot recv data: Permission denied, please try again.
      6. Permission denied, please try again.
      7. : Connection reset by peerey,password).
      8. error: failed to connect to the hypervisor


      Did I need to add any options, when setting up the user?
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      That didn't work. I have added user radio back into the libvirt, kvm, and ssh groups and am getting the now familiar

      Source Code

      1. root@openmediavault:~# virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      2. radio@192.168.1.151's password:
      3. error: End of file while reading data: sh: nc: not found: Input/output error
      4. error: failed to connect to the hypervisor
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      If you are logged in to the commandline as root on OMV you should be able to connect by:

      Source Code

      1. virsh list --all

      When you cannot use virsh qemu+ssh://radio@xx.xx.xx.xx list --all it could be because your ssh daemon is not running on OMV. Please check if ssh is running with:

      Source Code

      1. ps -A | grep ssh
      It should display at least one line with "sshd".
      In OMV GUI enable ssh with "permit root login", "Enable keyboard-interactive authentication" and "Permit to do ssh tunneling".
      When ssh is running and root login via ssh is enabled try to connect via virt-manager from another pc with first "root" as the user after that with "radio" as the user.

      BTW: If you are trying to run vir-manager on the OMV box you only need to connect with the parameters "qemu.//localhost" but then your logged in account need to have the group memberships.
      Files
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I thought something like that may have been happening, but ssh seems to be working fine. That is how I have been accessing OMV.
      Changing the order of things gets me in, as per example:

      Brainfuck Source Code

      1. stuart@stuart-desktop:20:55:59~$ ssh radio@192.168.1.151 virsh -c qemu:///system list --all
      2. radio@192.168.1.151's password:
      3. Id Name State
      4. ----------------------------------------------------
      5. stuart@stuart-desktop:20:56:13~$


      What it seems to bork at is using qemu+ssh://
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      So "radio" is member of the ssh group. Then you should be able to connect virt-manager from stuart-desktop. Can you try this?
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Just read through all of you posts in this thread again.
      It seems that the error is not on the host (OMV) side.
      As i interpretate this error

      Source Code

      1. WARNING: gnome-keyring:: couldn't connect to: /home/stuart/.cache/keyring-2Eh4T5/pkcs11: No such file or directory

      it states that you are missing parts of the nessecary ssh on stuart-desktop so ssh isn't working correct on your stuart-desktop.

      It says you're logged in as root on stuart-desktop but it looks for the gnome-keyring in /home/stuart/.cache/keyring............ on stuart-desktop.
      Is gnome-keyring installed on stuart-desktop? Try:

      Source Code

      1. dpkg -l gnome-keyring*


      Can you describe a little stuart-desktop - os, version, install etc.

      What happens when you in stuart-desktop are logged in as stuart and from this account issue:

      Source Code

      1. virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Logged in either as stuart or root the response to dpkg -l gnome-keyring* is:

      Source Code

      1. Desired=Unknown/Install/Remove/Purge/Hold
      2. | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      3. |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      4. ||/ Name Version Architecture Description
      5. +++-==============-============-============-=================================
      6. ii gnome-keyring 3.4.1-5 amd64 GNOME keyring services (daemon an


      I don't understand what the above is telling me. In Synaptic, it says that gnome-keyring is installed.

      When using virsh -c qemu+ssh://radio@192.168.1.151/system list --all from stuart-desktop, I get:

      Source Code

      1. stuart@stuart-desktop:13:57:50~$ virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      2. WARNING: gnome-keyring:: couldn't connect to: /home/stuart/.cache/keyring-X1mCif/pkcs11: No such file or directory
      3. radio@192.168.1.151's password:
      4. error: End of file while reading data: sh: nc: not found: Input/output error
      5. error: failed to connect to the hypervisor
      6. stuart@stuart-desktop:13:58:35~$


      My desktop is Debian Wheezy 64bit, with XFCE. After doing some searching on the internet, there appears to have been some bugs, using virt-manager on Wheezy, in relation to remote connections. But I haven't been able to discover if they have either been resolved, or whether they are the same connection issues I am having.
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I believe that we have been barking up the wrong tree. The error is on stuart-desktop and not on the KVM/Qemu installation on your OMV host.

      It seems like the gnome-keyring-pkcs11.so isn't loaded on startup by XFCE.

      I am using Ubuntu Unity for desktops so i can't replicate this at this moment but this bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1022322 states that XFCE default has an eror that this keyring module is not loaded on XFCE desktop
      They state that you can fix it by editing a XCFE startup file.

      On stuart-desktop log in as root. Edit /etc/xdg/autostart/gnome-keyring-pkcs11.desktop by

      Source Code

      1. nano /etc/xdg/autostart/gnome-keyring-pkcs11.desktop

      find the line with

      Source Code

      1. OnlyShowIn=GNOME;Unity

      replace it with

      Source Code

      1. OnlyShowIn=GNOME;Unity;XFCE

      Save and exit
      logout/login or reboot
      start virt-manager and connect to your KVM/Qemu host.

      PS: for those running LXDE the "XFCE" should be replaced by "LXDE"
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Well, that has fixed the gnome-keyring warning. Unfortunately the connection issue still remains.

      From the terminal:

      Source Code

      1. stuart@stuart-desktop:21:47:07~$ virsh -c qemu+ssh://radio@192.168.1.151/system list --all
      2. radio@192.168.1.151's password:
      3. error: End of file while reading data: sh: nc: not found: Input/output error
      4. error: failed to connect to the hypervisor
      5. stuart@stuart-desktop:21:47:27~$


      And the full message from virt-manager:

      Source Code

      1. Unable to connect to libvirt.
      2. End of file while reading data: sh: nc: not found: Input/output error
      3. Verify that the 'libvirtd' daemon is running
      4. on the remote host.
      5. Libvirt URI is: qemu+ssh://radio@192.168.1.151/system
      6. Traceback (most recent call last):
      7. File "/usr/share/virt-manager/virtManager/connection.py", line 1185, in _open_thread
      8. self.vmm = self._try_open()
      9. File "/usr/share/virt-manager/virtManager/connection.py", line 1167, in _try_open
      10. flags)
      11. File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
      12. if ret is None:raise libvirtError('virConnectOpenAuth() failed')
      13. libvirtError: End of file while reading data: sh: nc: not found: Input/output error
      Display All
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      Hmmm. There are several errors here.
      According to this site wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor this error could be because ssh isn't running on your host but since you can access the host via normal ssh login from stuart-desktop this isn't the problem.

      Could you try to use another desktop OS like booting Ubuntu 12.04 from a install-USB or install-CD, install virt-manager - in terminal

      Source Code

      1. sudo apt-get install virt-manager
      and try to connect to your KVM/Qemu host from this dekstop?
      This way we could determine wether the problem is on your KVM/Qemu host or your desktop.
      A thought just comes to me - Have you changed the ssh listening port on your OMV install. It should be port 22. Please check in the OMV GUI that ssh is listening on port 22.
      PS: I wil be away the next days and can't reply before sunday evening late CET.
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I have Xubuntu 12.04 on another partition, so went over there, did an update on it, and fixed the /etc/xdg/autostart/gnome-keyring-pkcs11.desktop file. Then installed virt-manager.

      Unfortunately with the same results, that I am getting with Wheezy. So it looks like its back to being an issue on the OMV machine.

      Just checked ssh settings on OMV, and they are set to port 22.
      OMV-version 0.5.25
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I'm only running Gnome and Unity on my desktops. I have en XFCE desktop at home that I will try against my KVM/Qemu OMV host when I get back home. I'll post the result back.
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417
    • Re: [HowTo] Run OMV as a KVM/qemu/libvirt host

      I have tried to install lubuntu (lxde) with virt-manager.

      I started virt-manager and it asked for "ssh-askpass-gnome" which i installed. When i logged in it initially tried to connect to libvirtd on the local machine and gave an error. I canceled and clicked file - create connection - made a remote connection to the KVM/Qemu host with the username that is member of the correct groups on the kvm/Qemu host.
      Everything worked as expected and i could se and manage my guest VM's

      If i tried to login with the root account it failed - as my root account isn't member of the nescessary groups on the KVM/Qemu host.

      Notice that the program needed for virt-manager to be able to connect through ssh is "ssh-askpass-gnome"
      Install on your desktop by

      Source Code

      1. apt-get update
      2. apt-get install ssh-askpass-gnome
      headless Squeeze with backports, Sardaukar current, Asus e35m1-i, 8 gig mem 6x WD30EFRX-68A 3Tb in raid6 with Minecraft,Subsonics, Solarpanel monitor, KVM host for Wheezy guest with iRedMail and Owncloud
      KVM on OMV HowTo: http://forums.openmediavault.org/viewtopic.php?f=13&t=2417