Re: Running KVM version ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux