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

  • I have come to the conclussion that the issue is with the installation on my OMV server. I have it working fine, locally, on my desktop (Debian Wheezy), so will just use it there for now. I will probably try again with OMV, once it has migrated to Wheezy.

  • Hi, i am new to the forum but have been lurking around for a while. :)
    Today i was managing to solve the same problem reported by stu and got luck, thought to register to report a solution. :)


    This input/output error while connecting through ssh is due to a missing package:


    Code
    sudo apt-get install netcat-openbsd


    After that i was able to login via SSH from within the host and another machine as well using virt-manager.


    Hope this helps!


    Cheers.

  • As I understand it KVM is almost entirely kernel based when it comes to the latest features. I use VGA passthrough and consequently want those patches in the 3.16+ kernels. I'm adept at compiling a kernel but before I did I wondered if there were any gotchas with updating the kernel manually and not using a backports kernel...


    I'm running 1.0 for testing purposes for the Linux Action Show so any help is greatly appreciated.

  • You shouldn't run into much problems if you know how to recompile your kernel to the latest. You know you can recycle the kernel config from your actual system, with that you should be good to go.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Hello,


    I had some problems with the system shutdown because a few services of Open Media Vault were needed in the virtual machines.
    These were already terminated before the VM's were shut down.
    For this I have created a shutdown script, which shuts down the VM's before all the necessary services.
    Maybe not solved quite well in some places, but it works!!


    Maybe it helps one or the other.


    Copy it to


    /etc/init.d/libvirt-shutdown

    and make it executable with


    chmod +x /etc/init.d/libvirt-shutdown


    After that a


    update-rc.d libvirt-shutdown defaults


    And the VM's will be shutdown bafore all configured services.


    With "waitmax" it is possible to set the time, as a multiple of 5 seconds, the script will wait before it will terminate the VM's hard.


    If anyone has any suggestions, let me know



    greetings
    der-brumm-baer

  • Considering Debian remove VirtualBox from their source because VirtualBox change SeaBIOS for another non-free BIOS And you can't neasting with VirtualBox; It might be interesting replacing VirtualBox by KVM into the next OMV version.

    They did?? Looks like it is still there to me. Anyone is free to write a kvm plugin now. I prefer to use Proxmox and run OMV on Proxmox.


    Code
    apt-cache policy virtualbox
    virtualbox:
    Installed: (none)
    Candidate: 5.0.24-dfsg-1~bpo8+1
    Package pin: 5.0.24-dfsg-1~bpo8+1
    Version table:
    5.0.24-dfsg-1~bpo8+1 500
    100 http://httpredir.debian.org/debian/ jessie-backports/contrib amd64 Packages
    4.3.36-dfsg-1+deb8u1 500
    500 http://security.debian.org/ jessie/updates/contrib amd64 Packages

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • They did?? Looks like it is still there to me. Anyone is free to write a kvm plugin now. I prefer to use Proxmox and run OMV on Proxmox.


    Hello ryecoaaron
    If I understand you use proxmox and OMV is a virtual machine.


    What is your configuration and how OMV share/manage your data ? --> disk passthrough from proxmox to OMV VM ? share from proxmox to OMV VM ? iscsi target ? other ?


    Thanks, sorry for my bad english

  • What is your configuration and how OMV share/manage your data ? --> disk passthrough from proxmox to OMV VM ? share from proxmox to OMV VM ? iscsi target ? other ?

    Yes, I use proxmox. I pass the data disks through to the OMV VM. I also have virtual disks assigned to the OMV VM that are on SSDs for speed.

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Proxmox uses the same kvm as virsh. So, no, they don't work. I don't think you can do snapshots with passthrough drives. Never tried with scsi/sata/etc. There isn't much changing on my OMV OS drive to need snapshots.

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • OK


    In fact I am trying to create a live backup policy for all VM.


    Did you backup your VM ? If yes how ?offline ?


    tomorrow I will try to upgrade from debian wheezy (stable OMW) to jessie with OMW 3. --> apt-get dist-upgrade must work, and thanks to virtualisation ;-) and you ! :-)


    Thanks

  • Smart and spindown passthrough works with scsi driver only. However, for good performance, you need to use the virtio driver. So you need to choose: performance and SMART/spindown are handled by the host, or handle SMART/spindown in OMV, but suffer low performance.


    The only other way is to pass through the PCI SATA controller, which gives direct access to the SATA controller from the OMV VM. I haven't tried this, because my Proxmox system drive is on the same SATA controller as the data drives, so I don't think that would work in my case.

  • For a general purpose and when I only have one physical machine I prefer OMV than proxmox.
    The only thing I found not optimal is the VirtualBox part (which I used and being make me happy for a very long time before I decided to switch KVM).


    So.
    If anyone decide to use KVM instead of VirtualBox on is OMV, the methodology described by @jensk still pretty accurate
    here you will find the update I made to make KVM running into OMV4.


    1. Install libvirt, kvm et cie
    apt -y install qemu-kvm bridge-utils libvirt-daemon libvirt-daemon-system


    2. Configure your Bridge interface
    NOTE1: If you want to configure the bridge via commandline, I would recommand to have no config in the WebUI under System -> Network -> Interfaces
    NOTE2: Replace ip, netmask broadcast, gateway, YOUR_INTERFACE et cie :)
    you could find these info with the command ip or ifconfig
    ip a s|grep -A3 -m1 MULTICAST


    nano /etc/network/interface


    I would recommend to reboot instead of service networking restart


    Don't forget, all the extra configuration @jensk do in his original post is worth it, I just didn't want to duplicate the info


    3. Managing the VM
    Now you could manage them with virsh (https://linux.die.net/man/1/virsh)
    But if, like me you like GUI you could use Virtual-Manager on you're desktop/laptop
    apt -y install virt-manager virt-viewer


    on the server (OMV) side you need to be sure to have a netcat (nc) accepting the -U parameters
    apt remove --purge netcat
    apt -y install netcat-openbsd


    that's it!


    Jonathan

  • Interesting thread, but I'm wondering why OMV is set up this way. It appears OMV is running on "bare metal" and KVM has been installed into that (Debian) system.


    In my own setup, I'm running KVM in Ubuntu18.04 (which I like better than Debian) and then running OMV as a guest VM. For the most part, this seems to work and makes it easy to isolate OMV.


    Wondering what people think the pros and cons are of this. Anyone doing it the way I am?


    Eric

  • Wondering what people think the pros and cons are of this. Anyone doing it the way I am?

    I run OMV on a few Proxmox (kvm) installs and it works very well. This thread started because people wanted to run kvm on OMV without virtualizing OMV because it makes the storage situation easier.

    omv 5.5.17-3 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.4.2
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I run OMV on a few Proxmox (kvm) installs and it works very well. This thread started because people wanted to run kvm on OMV without virtualizing OMV because it makes the storage situation easier.

    Hi Ryecoaaron


    Can you please make a tutorial that do exacly what you told, Intall OMV in proxmox?


    Thank you

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!