[GUIDE] How to install KVM + WebvirtMgr

  • Currently I don't use KVM on OMV
    I recommend to USE PROXMOX or OTHER HYPERVISOR

    ====================================

    Why KVM not using virtualbox?

    • more performance (benchmark is here)
      (but if you content with virtualbox performance, keep continue using)
    • pci passthrough
      especially vga passthrough supported (what is vga passthrough? watch this video)

    What is WebvirtMgr
    see first what it is, screenshot is here


    How to install?
    webvirtmgr uses libvirt (cli interface for KVM, and other hypervisor such as XEN)
    and libvirt uses KVM (already included in linux kernel) and qemu


    for OMV 3.x



    (for OMV 2.x change
    `jessie-backports` to `wheezy-backports`
    `virtualenv` to `python-virtualenv`
    change `2.9.1` to `2.8.0` using `nano /var/www/webvirtmgr/requirements.txt`
    `systemctl stop dnsmasq` to `/etc/init.d/dnsmasq stop`
    `systemctl retstart libvirtd` to `/etc/init.d/libvirtd restart`
    `systemctl enable supervisor` to `update-rc.d supervisor defaults`
    `systemctl start supervisor` to `/etc/init.d/supervisor start`
    )



    by default, webvirtmgr listen on 127.0.0.1:8000
    so you cannot access without ssh tunneling (guide is here)


    another method is change listen address but it is not secure
    vim /var/www/webvirtmgr/conf/gunicorn.conf.py
    change
    bind = '127.0.0.1:8000'
    to
    bind = '0.0.0.0:8000'


    but be sure! http connection is not secure your data can be sniffed
    (I don't explain about this detail but this is easy, hacker in public wifi, evil goverment can see your packet)


    I'am planning to make a guide for how to setup secure https and reverse proxy but I'm not sure when
    when I make a guide I will link it here


    Known bug
    1. In storage menu
    creating ISO dosen't work
    workaround for this is create DIR with name 'iso' (case sensitive)


    2. In webconsole, key AltGr in German keylayout dosen't work



    Optional: VGA Passthrough (for advanced user)


    Requirement

    • your motherboard and cpu support vt-d which is differnt from vt-x
      you should enabled vt-d in your bios setting ( search google your cpu model to know it is support vt-d)
    • your kernel should be at least >=3.9
      so you shuld install backports kernel in OMV 2.x (in OMV 3.x, stock kernel is ok, but I recommend backports kernel too)
    • you have at least 2 gpu in your system, one graphic card is for host (intergrated, external graphic all ok), the other are for guest (external graphic card only)
    • An UEFI compatible GPU (Most modern gpus support this, Does my graphics card ROM support EFI?
    • An UEFI compatible GUEST (ex: Windows 7 and up)


    Setup
    you shuld update kernel boot parameter
    for intel cpu
    append kernel boot parameter permanently `kvm.ignore_msrs=1 intel_iommu=on` (click here)
    and reboot


    check lspci -Dnn
    result format is
    domain:bus:slot.function device_name [vender_id:device_id]
    find your graphic card with device_name


    edit /etc/rc.local
    below is example for gpu pass through
    change constant according to your graphic domain:bus:slot.function
    I enclose constant that you need to change with []
    after that execute /etc/rc.local


    for OMV 3.x ( for OMV 2.x change all vfio-pci to pci-stub except `modprobe vfio-pci`, change it to `modprobe pci_stub`)


    install OVMF bios for qemu
    for OMV 3.X apt-get install ovmf
    for OMV 2.X
    wget http://ftp.us.debian.org/debia…131112.2590861a-3_all.deb
    dpkg -i ovmf_0~20131112.2590861a-3_all.deb


    create VM in webvirtmgr, go settings -> XML in webvirtmgr
    append hostdev elements, and loader like below exmaple
    change bus slow function to your gpu




    Optional: intel intergrated gpu (intel HD) passthrough (for advanced++ user)
    Requirement

    • intel cpu >= sandybridge
    • no need to additional external graphic card
    • kernel >= 4.6 (if you are OMV 2.X manually compile kernel, if you are OMV 3.X install backports kernel)
    • qemu >= v2.7.0-rc0 (there is no official package for this, manually packaging it)
    • latest seabios (also you should manually compile)


    see manual (I belive advanced++ user, and I'm lazy :) )




    Question & Discussion
    here


    you can ask question if something goes wrong

    OMV3 on Proxmox
    Intel E3-1245 v5 | 32GB ECC RAM | 4x3TB RAID10 HDD
    omv-zfs | omv-nginx | omv-letsencrypt | omv-openvpn
    Click link for more details

    37 Mal editiert, zuletzt von luxflow ()

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!