KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

How to determine KVM version when it comes with the vendor kernel?

5 replies [Last post]
Kenni Lund
Offline
Joined: Nov 25 2008
Points: 88

I've been wondering about this simple question for quite a while:

Does anyone know of a way to figure out the running KVM-version, when it's compiled as modules in the vendors kernel package (in Arch Linux)? A modinfo doesn't give out any information about the version. I've noticed that when I download and compile kvm-82 myself, the exact version of kvm will be written to /var/log/messages when I load the module. But that's not the case with the kvm-version supplied with the kernel.

I've also been trying to search through the kernel header files and kernel.org without any luck...it can't be that hard to figure out, but nevertheless, I haven't figured it out yet.

Thank you
Kenni

sweco
Offline
Joined: Feb 20 2009
Points: 0
Just run command kvm

Run 'kvm |head -1'

In my computer it looks like this..

QEMU PC emulator version 0.9.1 (kvm-72), Copyright (c) 2003-2008 Fabrice Bellard

Anonymous
Re: Just run command kvm

Hm, from my experience this has not to be the same
(version kvm-executable != version kvm.ko & kvm_amd.ko)

You can use "stock-kernel" kvm-modules with fresh compiled
kvm executable.

Surely one wants a method to definately tell the version
of e.g. kvm_amd.ko !

regards,

joern

Haydn Solomon
Offline
Joined: Mar 7 2008
Points: 458
Re: kvm versions

Kenni,

You can expect to see kvm versioning based on linux kernel and qemu very soon. This should make things more consistent across lilnux distributions.  See the mailing list discussion at the following link.

http://www.mail-archive.com/kvm@vger.kernel.org/msg11335.html

John Fraize (not verified)
How I found my kvm version

Not pretty but I think it worked

A root do the following command

modprobe -l kvm --show-depends

This is the output from the above command
/lib/modules/2.6.18-164.11.1.el5/extra/kmod-kvm/kvm.ko

Then I used this to dump out the version of that file.
strings /lib/modules/2.6.18-164.11.1.el5/extra/kmod-kvm/kvm.ko | grep -i version

Not absolutely sure this is correct, but it is something.

Kenni Lund
Offline
Joined: Nov 25 2008
Points: 88
Re: How I found my kvm version

John,

You're replying to a thread which I opened 16 months ago...

Nevertheless, if someone else drops by this thread looking for an answer to the same question:
It doesn't make sense to look at the version of KVM anymore. If you're using a recent regular vanilla kernel, the KVM-version will be exactly identical to the kernel version. Eg. if you use kernel 2.6.33.1, your KVM-version (now known as kvm-kmod) will be 2.6.33.1...

The exception to this is when you're using an enterprise grade distribution, like RHEL or CentOS. On those distributions it makes absolutely no sense to look at the KVM version, as the kvm modules will be some old version, but with tons of backports. If you are able to get a version, using a method like strings against the module, it only tells you, that "you have a kvm version which feature-wise and bug-wise lies somewhere in between the mentioned version and the latest git-version of the KVM modules".

Back when I raised this question, the KVM project followed a kvm-XX versioning and both the KVM modules as well as the userspace parts were using this versioning. The question is not relevant anymore.

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.