public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Florent B <florent@coppint.com>
Cc: kvm list <kvm@vger.kernel.org>
Subject: Re: Running KVM version ?
Date: Thu, 9 Apr 2015 17:58:21 +0200	[thread overview]
Message-ID: <20150409155821.GA9729@potion.brq.redhat.com> (raw)
In-Reply-To: <55267E59.1020600@coppint.com>

2015-04-09 15:27+0200, Florent B:
> Hi everyone,
> 
> This list seems to be a developer list, I didn't find any "users" list.

I don't think it exists, KVM is used mostly by programs and they are not
sophisticated enough to communicate.
(or they are, which is why humans aren't invited)

> So please forgive me if I'm at the wrong place.

qemu-discuss/libvirt-users/openstack-operators (whatever you face) or
stack overflow are better for questions about virtualization.

> I would like to know if there's a way to know the version of a running
> kvm process ?

I think you meant QEMU process.  KVM is the kernel part and it can't
change while any VM is running.  (`uname -r` gives kernel version.)

There are at least four ways to get VM's QEMU version.
I presume you are using at most libvirt.

1a) virsh
   1. get name of the VM
   2. # virsh qemu-monitor-command $name --hmp info version
1b) qemu monitor
   1. access the monitor (if you don't use libvirt, you should know how)
   2. (qemu) info version
   (2+. curse and repent if you set up JSON monitor)

3) reading /proc/$pid/mem
   1. get PID of the QEMU process
   2. # cd /proc/$pid/
   3. # offset=$((0x`awk -F - '/r-x.*qemu/{print $1}' maps`))
   4. # dd skip=$offset if=mem bs=1 | strings | grep 'emulator version'

4) gdb
   (You probably don't have debuginfo and the option above is easier.)

> I have some VMs running for 100+ days, and I would like to know if I
> need to restart them to run with a newer version of kvm.

No need to know the version for that.  You can take look when the binary
was updated and compare it with process start time.

      reply	other threads:[~2015-04-09 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 13:27 Running KVM version ? Florent B
2015-04-09 15:58 ` Radim Krčmář [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150409155821.GA9729@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=florent@coppint.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox