Easy to manage KVM host setup



  • We have been running Citrix Xenserver for simple virtualization needs.

    I was thinking about setting up a KVM host as an alternative and was wondering what I should install to make it as easy as possible to manage?

    On xenserver we would use xencenter. So it has to be a GUI of some kind. Is ovirt what I'm looking for?

    Also is CentOS the easiest way to install KVM? Xenserver has it's own ISO so it's really easy to install and I'm looking for something equally hassle free.



  • Use Fedora Server instead of CentOS for your KVM host.

    Cockpit is capable of managing virtual machines.

    sudo dnf install cockpit cockpit-machines
    sudo systemctl enable --now cockpit.socket
    sudo firewall-cmd --permanent --add-service=cockpit
    sudo firewall-cmd --reload
    
    https://ip-address:9090/
    


  • I agree, Fedora over CentOS. You don't want your host that outdated.



  • @pete-s

    shhhh dont listen to them, Centos rocks for KVM. They just love living bleeding edge.

    Also KVM has no standard GUI even the semi-official stuff in the repo wont allow you to create VM but will allow you to monitor their status, assuming you wont everything on one machine, the KVM + management tools.

    The defacto best GUI is applicaiton called Virt-Manager, this can be on Fedora to get the latest version of it, while the web interface manager is called cockpit and it has addon for KVM called cockpit-machines

    Start from minimal Centos :

    1. Check CPU support for Virtualization:
      grep -E '(vmx|svm)' /proc/cpuinfo

    2. Install KVM:
      yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools" -y

    3. For remote managment install cockpit:
      yum install cockpit cockpit-machines cockpit-storaged cockpit-networkmanager -y
      systemctl start cockpit
      systemctl enable cockpit.socket

    4. Setup passwordless SSH login from the KVM server to the Virt-Manager machine (can be VM or real)
      ssh-keygen
      ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.x

    5. Validate by "virt-host-validate"
      and visit => https://192.168.1.x:9090



  • @scottalanmiller would it not depend on what you want to gain from using kvm on a certain dist? say, wanting to gain experience in the most widely used distribution in linux shops? i assumed that would be centos.



  • No matter what OS you use Virt-Manager is the only GUI that will do everything. Cockpit isn't there yet, you can only do limited tasks with it.



  • Anyone has an idea that how to set CPU limit per vm. The vm has to be limited to use only 10% of one core. Cggroups? Thanks a lot



  • @abcy said in Easy to manage KVM host setup:

    Anyone has an idea that how to set CPU limit per vm. The vm has to be limited to use only 10% of one core. Cggroups? Thanks a lot

    Using Virt-Manager, these are the only options available.
    0_1530888219747_screenshot.png



  • Fedora Server was a no go on the old HP server I had. It would hang during install.
    I tried xcp-ng (= xenserver ~ centos) on it and it installed fine. Debian 9 also installs fine.

    I'll try CentOS next.



  • @emad-r said in Easy to manage KVM host setup:

    Centos rocks for KVM

    I still use CentOS too. I just hate how old packages like cockpit is on it especially related to cockpit-machine.



  • @pete-s said in Easy to manage KVM host setup:

    Fedora Server was a no go on the old HP server I had. It would hang during install.
    I tried xcp-ng (= xenserver ~ centos) on it and it installed fine. Debian 9 also installs fine.

    I'll try CentOS next.

    That's surprising. What server is it?



  • @abcy said in Easy to manage KVM host setup:

    Anyone has an idea that how to set CPU limit per vm. The vm has to be limited to use only 10% of one core. Cggroups? Thanks a lot

    What is the ungodly use case for this restriction?

    I mean this seriously. I want to know what business need could possibly cause a restriciton like this to come into play.



  • @jaredbusch said in Easy to manage KVM host setup:

    @abcy said in Easy to manage KVM host setup:

    Anyone has an idea that how to set CPU limit per vm. The vm has to be limited to use only 10% of one core. Cggroups? Thanks a lot

    What is the ungodly use case for this restriction?

    I mean this seriously. I want to know what business need could possibly cause a restriciton like this to come into play.

    I wanted to let someone else ask the question lol.



  • @stacksofplates said in Easy to manage KVM host setup:

    @jaredbusch said in Easy to manage KVM host setup:

    @abcy said in Easy to manage KVM host setup:

    Anyone has an idea that how to set CPU limit per vm. The vm has to be limited to use only 10% of one core. Cggroups? Thanks a lot

    What is the ungodly use case for this restriction?

    I mean this seriously. I want to know what business need could possibly cause a restriciton like this to come into play.

    I wanted to let someone else ask the question lol.

    Well, I get that there are weird snowflake use cases out there. I won't argue the need for something like this being mandated.

    But gods above, please tell me why.



  • @black3dynamite said in Easy to manage KVM host setup:

    @emad-r said in Easy to manage KVM host setup:

    Centos rocks for KVM

    I still use CentOS too. I just hate how old packages like cockpit is on it especially related to cockpit-machine.

    There really isn't that much extra in the Fedora edition.



  • @scottalanmiller said in Easy to manage KVM host setup:

    @pete-s said in Easy to manage KVM host setup:

    Fedora Server was a no go on the old HP server I had. It would hang during install.
    I tried xcp-ng (= xenserver ~ centos) on it and it installed fine. Debian 9 also installs fine.

    I'll try CentOS next.

    That's surprising. What server is it?

    I had to go check what it was and it's a HP DL360 G5.
    It's too old and slow anyway so not a big deal, but still surprising.

    I have two Dell R710 laying around as well that I could use instead. They're a little less ancient I think (xeon 5500 series). It just for testing so as long as it works performance doesn't matter much. Just need to have enough RAM.