Difference between KVM and RHEV/OVIRT

Does the subject make any sense? hmmmm.. I don’t know. It is up to your decision because this is one of the questions which I get normally from people when they hear about Ovirt/RHEV ( RHEV is downstream/product offering from Red Hat based on upstream or community project called ovirt) or if you explain about it.

I will try to put these components in simple terms, if I fail, poke me with your comments.

KVM is a hypervisor, well yeah.. strictly speaking, I have to tell that, KVM makes/turns a Linux system as a hypervisor. Thus allows you to run virtual machines inside it. Sure, maybe you have heard that .. but then what is ‘libvirt’?

Libvirt is an API that allows you to talk with your hypervisor. The applications like ‘virt-manager can take help from Libvirt to talk to the hypervisor ( ex: KVM). Thus manage virtual machine life cycle ie nothing but creation, managing and additional features like migration..etc.

From the above explanation, you may understand that, if you have a Linux kernel running in your system/machine KVM can host VMs ( virtual machines), and applications like ‘virt-manager’ can be used to administer it with the help of a library or API called libvirt.

Then, how Ovirt/RHEV is related to KVM? well, if you take a picture of an Ovirt/RHEV environment in my mind, it would look like this.

[Hypervisor 1] <——> [ Ovirt Manager/RHEV-Manager] <——-> [Hypervisor 2]

How these hypervisors are made? again KVM makes this hypervisor .. These hypervisors contact/talk to RHEV/Ovirt-Manager server. What is the communication channel between these hypervisors and Ovirt/RHEV-manager? It is a service called “vdsm” Ok.. sounds good. In that case, no “libvirt”? hmmm.. RHEV3 or the latest version of Ovirt makes use of Libvirt service. In RHEV3 context “vdsm”, trigger libvirt for VM life cycle operations. but still, vdsm is the communication agent between ovirt/rhev hypervisor and RHEV-Manager/Ovirt-Manager

RHEV hypervisor can be a RHEL system with KVM modules loaded. Otherwise a ‘live CD’ image called RHEV-H can act as a hypervisor. RHEV-H does not differ from a RHEL hypervisor in terms of KVM or vdsm. Just think RHEV-H as a live CD image with minimal size. It is a dedicated appliance and not supposed to run other applications like RHEL hypervisor.

We talked about Ovirt-Manager/RHEV-Manager Or Ovirt-M/RHEV-M, but what is it?

In simple terms, it is the managing server. Think of it in terms of an ‘administration’ server. In fact a GUI installed server 🙂

Finally, Do you want a ‘windows server’ in a RHEV environment? hmmm.. RHEV-Manager in RHEV 2 required it., but the latest version of RHEV-3/Ovirt does not require the ‘windows’ server. You can install RHEV3/ovirt Manager in a Linux system with a simple command,

#rhev-m setup

I am stopping here.. but please feel free to ask your queries, if any. I would try to explain it in detail. This is a simple wrap up on KVM and RHEV/Ovirt…

ps# RHEV2 setup was not using ‘libvirt’ in RHEV hypervisor,

How to access/retrieve guest data from host system in kvm?

Earlier it was bit difficult to access data from guest image as it required serious attention on the process. But today it is much much easier using ‘guestmount’ binary. Thanks to libguestfs & fuse. Below snip from my Fedora system will prove my words.. [root@humbles-lap /]# which guestmount /usr/bin/guestmount [root@humbles-lap /]# rpm -qf /usr/bin/guestmount libguestfs-mount-1.8.13-1.fc14.x86_64 …

Read more

Where are guest configuration files located in KVM

I know it is a very simple question, but at the same time, if you don’t know the answer, it is not simple to you. That made me blog this information here.

In Fedora/RHEL, the guest configuration files are located under “/etc/libvirt/qemu” directory in the ‘name’ of the guest created in KVM.

[root@humbles-lap qemu]# pwd /etc/libvirt/qemu [root@humbles-lap qemu]#  ls networks rhel5.4-x86_64-kvm_backup.xml rhel5.4-x86_64-kvm.xml RHEL-5.xml rhevh.xml Window-2008.xml  [root@humbles-lap qemu]# cat rhel5.4-x86_64-kvm.xml |head -n 2 <domain type=’kvm’> <name>rhel5.4-x86_64-kvm</name> [root@humbles-lap qemu]#

Above output means, I have guests created in my system with names like rhevh, window-2008, rhel5.. etc

SR-IOV fails/error "SR-IOV: bus number out of range or ""not enough MMIO resources"

I have seen SR-IOV ( Single Root I/O Virtulaization) fails with these error messages (“SR-IOV: bus number out of range or “not enough MMIO resources” ) when using SR-IOV capable hardware devices. Couple of things can contribute to this issue. One of them can be the subjected kernel calculate the size of a SR-IOV bar …

Read more

Set scsi disk timeout value for guest virtio disks in qemu kvm…

Today my friend asked me, how can he set “timeout” value for his KVM guest which uses virtio disks. ?. In guest, virtio devices will be represented as “vd{a,b,c..} devices.. He experienced to set that value for a scsi device (ex: echo 180 > /sys/block/sdd/device/timeout) .. My answer was, it is NOT required , so …

Read more

hdparm failed with error ” HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device. “

One of my friend was trying to run ‘hdparm’ command against guest disk called ‘vdb’ and received above mentioned error. [root@lap]hdparm -t /dev/vdb **** HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device If the guest disk is shown as ‘vda,vdb..etc’ , those are virtio disks which run by virtio bus. ‘hdparm’ is a …

Read more

How to know disk image format and other details of a guest disk using ‘qemu’ commands ?

As you know there are different image formats which can be used for guest space.. Below are some of them with brief notes on it. > raw Raw disk image format (default). This format has the advantage of being simple and easily exportable to all other emulators. If your file system supports holes (for example …

Read more

How to connect a kvm guest via spice protocol

In this blog, I will show you how to connect a kvm guest by spice. As you know first of all we have to edit the guest configuration file for “graphics” to be spice as shown below. Hypervisor side modifications: ————————————– It may look like below in your system, graphics type=’vnc’ port=’-1′ autoport=’yes’ This can …

Read more

How KVM modules are automatically loaded at time of boot?

Quite often people ask this question to me, so I thought of mentioning it here in my blog. There need to be two modules loaded in the system for KVM to operate properly . Those are “kvm” and “kvm-intel/kvm-amd” depend on system hardware. How-ever for lots of people it is still mystery how these modules …

Read more