[Libvir] PATCH: Explicit detection of KVM version

Before starting any guest, the QEMU driver needs to figure out what version of QEMU is in use & thus determine whether it supports particular command line flags. We currently do that just by calling /usr/bin/qemu, since all the various qemu-system-XXX binaries share the same syntax. The only problem is that qemu-kvm does not neccessarily match the version of qemu installed. So we detect QEMU version 0.8.2, but KVM is 0.9.0 based. The result is that we pass the wrong style VNC argument to KVM & it fails to start. The second problem is that even if you only ever want to run KVM guests, you still have to have KVM itself installed. This patch tweaks the feature/version detection so we do separate detection just for KVM. With this applied I can successfully start KVM guests if the QEMU version is different, or even if QEMU is not installed. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Thu, Sep 20, 2007 at 04:05:21AM +0100, Daniel P. Berrange wrote:
Before starting any guest, the QEMU driver needs to figure out what version of QEMU is in use & thus determine whether it supports particular command line flags. We currently do that just by calling /usr/bin/qemu, since all the various qemu-system-XXX binaries share the same syntax. The only problem is that qemu-kvm does not neccessarily match the version of qemu installed. So we detect QEMU version 0.8.2, but KVM is 0.9.0 based. The result is that we pass the wrong style VNC argument to KVM & it fails to start. The second problem is that even if you only ever want to run KVM guests, you still have to have KVM itself installed.
This patch tweaks the feature/version detection so we do separate detection just for KVM. With this applied I can successfully start KVM guests if the QEMU version is different, or even if QEMU is not installed.
Looks fine to me, +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Daniel P. Berrange wrote:
Before starting any guest, the QEMU driver needs to figure out what version of QEMU is in use & thus determine whether it supports particular command line flags. We currently do that just by calling /usr/bin/qemu, since all the various qemu-system-XXX binaries share the same syntax. The only problem is that qemu-kvm does not neccessarily match the version of qemu installed. So we detect QEMU version 0.8.2, but KVM is 0.9.0 based. The result is that we pass the wrong style VNC argument to KVM & it fails to start. The second problem is that even if you only ever want to run KVM guests, you still have to have KVM itself installed.
This patch tweaks the feature/version detection so we do separate detection just for KVM. With this applied I can successfully start KVM guests if the QEMU version is different, or even if QEMU is not installed.
Looks good to me. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Richard W.M. Jones