15

I have gone through many sites and tutorials for KVM installation and every tutorial says "install KVM under XYZ OS".

KVM is a type 1 (bare metal) hypervisor. So shouldn't KVM be installed directly on top of hardware?

Is it possible to install KVM on a completely bare metal without any OS just like ESXi?

For ESXi we don't need any OS, we can directly install it from media. Our goal is to directly install KVM hypervisor on a bare metal CPU with no OS.

1
  • 2
    ESXi is an OS....
    – jesse_b
    Commented May 3, 2018 at 17:54

3 Answers 3

11

I believe you're misunderstanding how it works. KVM is a combination of the kernel modules (mainlined in the kernel since 2.6.20 if I remember correctly) and utilities needed to run a Virtual Environment (libvirt, virt-install, virt-manager, qemu, etc).

Look at ESXi. That is a Linux system all by itself that sits on bare metal with the bits required to run the Virtual Host piece, including the kernel modules, binaries, etc. Any machine that is considered a KVM host will be doing the same thing, acting as a Virtual Host. Think about it. The OS is always installed to bare metal.

I would recommend reading here: http://www.linux-kvm.org/page/Main_Page

I know this isn't part of your question, but I really recommend installing an absolute BARE system, meaning, just the minimum amount of packages for a system to be functional, and then going from there. Keep the host to one purpose, and one purpose only: To be a virtual host for a virtual environment. I run four CentOS 7 KVM machines at home in a cluster. That's all they do, run libvirt (the vital service for KVM).

6
  • :So ESXI has inbuilt linux OS inside it and hence we dont require any OS (inshort ESXI mimics as if its running alone)While on KVM side we would require to first install an OS (Centos ,ubuntu etc) and then install kVN over it .Is it fine if we install only minimum version of ubuntu . Commented Mar 11, 2016 at 0:27
  • It would be more accurate to say that ESXI tries to hide the fact that there is a Linux OS installed and running on the bare metal (it wants to appear to be a single-vendor one-shot fully-integrated product), but it's still installing and running Linux. And yes, a minimal Ubuntu install with just the bare minimum required to run libvirt etc will work just fine. In my experience, it works better than vmware because it's not using a hideously crippled custom linux distro as its base.
    – cas
    Commented Mar 11, 2016 at 3:34
  • 1
    Actually ESXi does not use a Linux kernel. It does have a kernel that is Linux-like and does run BusyBox and more on top of their kernel.
    – fpmurphy
    Commented Mar 11, 2016 at 7:56
  • @fpmurphy1 You are correct, I haven't used ESX in a long time to remember that. It was dropped a long time ago.
    – Sokel
    Commented Mar 11, 2016 at 14:27
  • @fpmurphy1 Like Vcenter are there tools for KVM also ?Have installed a minimum Ubuntu version and running KVM on top of it Commented Mar 12, 2016 at 23:16
5

Amazing how people still fall for the "baremetal" marketing pitch. There is no such thing, or rather if there was, it would have been implemented in firmware and not software.

You need to understand that any x86 machine needs an OS to operate, you need drivers to interact with the hardware and process control, schedulers and so on, otherwise, you cannot do anything. The "baremetal" part of any OS are the drivers, since this is the part that interacts directly with the hardware. Intel VT and AMD SVM are also hardware, and a hypervisor is pretty much a driver for this hardware. ESXi is an OS, trimmed down and designated for specific kinds of load, but an OS nonetheless. KVM is that very driver for VT, and since Linux (the kernel) already has the rest of the hardware support and schedulers in place, to become a proper "baremetal" hypervisor, all it needed was the KVM module.

Now you can argue which approach - reusing the Linux kernel, which has been tested and proven over the years, or rewriting it as a new OS is better, but essentially, there is no such thing as a baremetal hypervisor for x86. Leave marketing alone and pick the hypervisor that suits your needs.

2
  • Like Vcenter are there tools for KVM also ?Have installed a minimum Ubuntu version and running KVM on top of it Commented Mar 12, 2016 at 23:15
  • Of course there are, if you want a vcenter replacement, you will like oVirt, if you want the cloud thing, you want openstack, if all you want is a local server management, you want virt-manager
    – dyasny
    Commented Mar 13, 2016 at 1:26
2

KVM like any virtual machine need some OS to be launched. That OS can be tiny, there are VM that work under Android, but still you need some OS. ESXi has it's own OS inside it, just like any hardware router.

1
  • So is my below understanding right . As Esxi has its own OS and hence dont need to install another OS inside it right (ie:ESXI mimics as if its running alone).While on KVM side we would require to first install an OS (Centos ,ubuntu etc) and then install kVN over it .Is it fine if we install only minimum version of ubuntu. Commented Mar 11, 2016 at 2:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .