Best tool to manage Centos KVM ? + Guide



  • Hello all,

    So recently i began learning more about KVM, and loving it.
    I come from ESXi background

    And for me using anything but minimal hyper-visor is not preferable, I look at ESXi 6.5 and previous and the hypervisor is ~350 MB, basically what I am saying is that I dont want to use Proxmox.

    So I found out the best way moving forward is the Pure (and free) KVM approach, which is to install Centos latest minimal then:

    Install ifconfig:

    1. yum install net-tools

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

    Install KVM:
    3) yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools"

    And when that is done, congrats you have KVM enabled machine, you will need to stop the firewall, if you wish to SSH to it or allow rule to the target machine to allow ssh.

    The best way of playing with KVM I found it, in single machine is with Vmware Workstation, cause its the only Type 2 Hypervisor that allows the VM guests inside to have Intel VT-D and AMD-V (I wish virtualbox would have this, but it a feature request was placed since 2012 and I doubt any further progress is being made)

    So afterwards I install 2 centos VM with KVM and 1 vm with latest Fedora LXDE spin and install Virt-Manager using: yum install virt-manager

    And connect to them using Virt-Manager and everything is working out smoothly... however are you aware of other simple tools to manage KVM, Virt-Manager is okay, and I like the concept of having similar C# vsphere client to manage KVM, but it seems to me abit lacking.

    Even there virt-viewer packages (for windows version 5.0)are non nonfunctional, I could only view my guest machines, but for some weird reason when I first connect to VM using virt-viewer I could only type 3 letters then the keyboard will be disabled ... go figure

    So what other options do I have, bare in mind I want to keep things simple and dont want Domain name, and stuff like that, I would like to connect to my KVM via IP, what do you guys use :

    This looks interesting as well :
    http://archipelproject.org/



  • It depends on what you want: virt-manager is considered the de-facto standard with few servers and VMs. Windows support is a mess in my experience. My workstation is a win10 machine with a linux VM constantly spawned, as my company uses win10 everywhere but I need a lot of linux stuff. So, when I need to go back to VM admin I simply open virt-manager in the linux VM on my workstation <- hoestly I do this rarely as my machine are created and kept running all the time.

    Another tool for lightweight admin, still a bit lacking in features, is webvirt manager. It is a web app that you can even virtualize on a KVM host, then, you can connect the webvirt VM to the host (a la XOA).

    I've use it for a while at the beginning but then I've gone back to virt-manager.

    Moving to a more complex setup you could mind about ovirt: it is an orchestrator a la vServer and it requires a lot of stuff installed on top of libvirt-kvm. So, unless you need something like a data-center pane, avoid it. It will requires a lot of resources and setup.



  • Thanks for the Web virt suggestions, I gave that try and didnt like really... but that got me thinking to Cloudmin even thought its not free.

    But it seems I am stuck with Virt-Manager for some time, Btw I came closer to fixing the weird typos when I use virt-viewer In windows, apparently I have to put my mouse on the toolbar insert keys to type keyboard stuff, but even when I do this, the keyboard input i type is not the same as displayed for example if I pressed

    YES on keyboard it will display something else, however if I pressed multiple times it will display YES eventually ... dont ask me why this is happening... I played with locale and keymap and all the keyboard options, this is the max for me.

    KVM + Virt-Manager is good for hosted enviroment that only 1 person will interact with. Unlike ESXi standalone host, it has support for VMRC which is 40 MB download executable that allows any Mac OS X/Windows/Linux to connect to VM from command line.



  • @msff-amman-Itofficer just use the libvirt shell, virsh! You can both connect to the host via ssh and use virsh installed on the host, or install virsh in the machine you are connecting from and use virsh in a remote fashion.

    Virsh can do almost anything you can do with KVM: you can even edit the XML configuration of vm and networks by hand, so really no flexibility limit.
    It's also easy scriptable and include a serial remote console, so you can install your OS by hand etc.

    If you really really need a graphical console with virsh, you can install any VNC client on your machine and connect to a vm using virsh this way.



  • @Francesco-Provino

    While I understand what your saying, and it is the ''pure way'' its not that I dont want to learn new things, its just I want to be quick at deploying VMs, and having a tool for me is much preferred.

    But will try to keep that as an option, I do deal with virsh shell, but in very humble mannor, like Virsh Destroy and list --all and start/shutdown. But down the road I will learn more.



  • I found this as well:

    https://github.com/tobimensch/aqemu
    https://sourceforge.net/projects/aqemu/?source=navbar

    BUt no windows port 😞 I wonder how long and much will it take to me port it



  • @msff-amman-Itofficer said in Best tool to manage Centos KVM ? + Guide:

    @Francesco-Provino

    While I understand what your saying, and it is the ''pure way'' its not that I dont want to learn new things, its just I want to be quick at deploying VMs, and having a tool for me is much preferred.

    But will try to keep that as an option, I do deal with virsh shell, but in very humble mannor, like Virsh Destroy and list --all and start/shutdown. But down the road I will learn more.

    Mmmh, if you want to quickly provision VMs you just have to script it! I have made scripts that creates simple VMs (small, large, etc) with different OSs using <10 lines of bash or python.
    It's also very easy to export the xml of a gold master VM and create N new VMs using the master configuration as a template… surely quickly than going through all those gui-based steps!

    Libvirt include several tools that automatically install, customize and deploy VMs in a cloud-like way.
    For example, in one line of virt-builder you can create ready-to-go VM customizing password, installed packages and many other stuff without look at an install prompt: everything is completely automated.



  • @msff-amman-Itofficer just look at this for quickly provisioning.



  • Virt-Manager obfuscates the entries in the window on purpose. If you generate a key instead of using a password to log into the machine, it won't ask you for the password any more. This is especially helpful when using SPICE as it will ask you for your password on every channel it sets up for the console.

    Virt-Manager and virsh are the only tools I use to manage KVM.



  • Needs tags



  • @stacksofplates

    Hey man.

    I managed to generate keys (inside Linux environment using ssh-keygen -t rsa and use ''authorized_keys'' file on both machines) and things are alot smoother now, but going back to what you mentioned:

    ''Virt-Manager obfuscates the entries in the window on purpose."

    Seeing you have many posts that deal with KVM, can you help me sort this out. How can I fix this? does it need something like ssh pass-wordless login to resolve, but in Windows environment (virt-viewer) they dont have ssh... so how can I resolve it?



  • @msff-amman-Itofficer said in Best tool to manage Centos KVM ? + Guide:

    @stacksofplates

    Hey man.

    I managed to generate keys (inside Linux environment using ssh-keygen -t rsa and use ''authorized_keys'' file on both machines) and things are alot smoother now, but going back to what you mentioned:

    ''Virt-Manager obfuscates the entries in the window on purpose."

    Seeing you have many posts that deal with KVM, can you help me sort this out. How can I fix this? does it need something like ssh pass-wordless login to resolve, but in Windows environment (virt-viewer) they dont have ssh... so how can I resolve it?

    That I don't know how to answer. I don't have any Windows machines so I never encounter those issues.



  • Install SSH on your Windows box: https://chocolatey.org/packages/openssh. This is a port of OpenSSH made by Microsoft's Powershell team.



  • @msff-amman-Itofficer said in Best tool to manage Centos KVM ? + Guide:

    but in Windows environment (virt-viewer) they dont have ssh... so how can I resolve it?

    Windows has had SSH for a while now. Both OpenSSH as a server and OpenSSH as a client, plus tools like Putty, too.



  • The Windows 10 Developer set installs SSH by default now, too.



  • @scottalanmiller said in Best tool to manage Centos KVM ? + Guide:

    The Windows 10 Developer set installs SSH by default now, too.

    Very cool.



  • @scottalanmiller said in Best tool to manage Centos KVM ? + Guide:

    @msff-amman-Itofficer said in Best tool to manage Centos KVM ? + Guide:

    but in Windows environment (virt-viewer) they dont have ssh... so how can I resolve it?

    Windows has had SSH for a while now. Both OpenSSH as a server and OpenSSH as a client, plus tools like Putty, too.

    That doesn't help with virt-viewer though unless you're making a tunnel. I've never used virt-viewer on windows so I don't know if it has an option for keys.