qemu: check for kvm availability before starting kvm guests
qemu: check for kvm availability before starting kvm guests

This *kind of* addresses:

  https://bugzilla.redhat.com/show_bug.cgi?id=772395

(it doesn't eliminate the failure to start, but causes libvirt to give
a better idea about the cause of the failure).

If a guest uses a kvm emulator (e.g. /usr/bin/qemu-kvm) and the guest
is started when kvm isn't available (either because virtualization is
unavailable / has been disabled in the BIOS, or the kvm modules
haven't been loaded for some reason), a semi-cryptic error message is
logged:

  libvirtError: internal error Child process (LC_ALL=C
  PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -device ? -device
  pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,?) status
  unexpected: exit status 1

This patch notices at process start that a guest needs kvm, and checks
for the presence of /dev/kvm (a reasonable indicator that kvm is
available) before trying to execute the qemu binary. If kvm isn't
available, a more useful (too verbose??) error is logged.

iam-TJ/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,cbosdo/libvirt,jeckersb/libvirt,rmarwaha/libvirt1,zippy2/libvirt,jfehlig/libvirt,cbosdo/libvirt,eskultety/libvirt,datto/libvirt,emaste/libvirt,zhlcindy/libvirt-1.1.4-maintain,jfehlig/libvirt,jeckersb/libvirt,iam-TJ/libvirt,jardasgit/libvirt,foomango/libvirt,danwent/libvirt-ovs,iam-TJ/libvirt,emaste/libvirt,agx/libvirt,wiedi/libvirt,iam-TJ/libvirt,wiedi/libvirt,crobinso/libvirt,agx/libvirt,fabianfreyer/libvirt,iam-TJ/libvirt,fabianfreyer/libvirt,trainstack/libvirt,rmarwaha/libvirt1,taget/libvirt,VenkatDatta/libvirt,siboulet/libvirt-openvz,dumbbell/libvirt,rmarwaha/libvirt1,elmarco/libvirt,warewolf/libvirt,taget/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,zhlcindy/libvirt-1.1.4-maintain,VenkatDatta/libvirt,bjzhang/libvirt,emaste/libvirt,datto/libvirt,dumbbell/libvirt,zhlcindy/libvirt-1.1.4-maintain,jeckersb/libvirt,siboulet/libvirt-openvz,siboulet/libvirt-openvz,rmarwaha/libvirt1,libvirt/libvirt,wiedi/libvirt,jeckersb/libvirt,bjzhang/libvirt,wiedi/libvirt,novel/fbsd-libvirt,novel/fbsd-libvirt,emaste/libvirt,bjzhang/libvirt,andreabolognani/libvirt,rmarwaha/libvirt,emaste/libvirt,andreabolognani/libvirt,elmarco/libvirt,dumbbell/libvirt,dumbbell/libvirt,wiedi/libvirt,libvirt/libvirt,zippy2/libvirt,jfehlig/libvirt,andreabolognani/libvirt,rmarwaha/libvirt,eskultety/libvirt,crobinso/libvirt,trainstack/libvirt,eskultety/libvirt,datto/libvirt,taget/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,jeckersb/libvirt,olafhering/libvirt,rlaager/libvirt,rmarwaha/libvirt,taget/libvirt,foomango/libvirt,rmarwaha/libvirt,libvirt/libvirt,danwent/libvirt-ovs,rlaager/libvirt,agx/libvirt,rmarwaha/libvirt1,novel/fbsd-libvirt,iam-TJ/libvirt,warewolf/libvirt,nertpinx/libvirt,novel/fbsd-libvirt,jfehlig/libvirt,fabianfreyer/libvirt,cbosdo/libvirt,zippy2/libvirt,shugaoye/libvirt,agx/libvirt,rmarwaha/libvirt1,trainstack/libvirt,shugaoye/libvirt,rmarwaha/libvirt,shugaoye/libvirt,foomango/libvirt,elmarco/libvirt,elmarco/libvirt,datto/libvirt,novel/fbsd-libvirt,trainstack/libvirt,zippy2/libvirt,rmarwaha/libvirt,novel/fbsd-libvirt,nertpinx/libvirt,rlaager/libvirt,danwent/libvirt-ovs,rlaager/libvirt,andreabolognani/libvirt,dumbbell/libvirt,crobinso/libvirt,taget/libvirt,nertpinx/libvirt,dumbbell/libvirt,iam-TJ/libvirt,warewolf/libvirt,eskultety/libvirt,VenkatDatta/libvirt,crobinso/libvirt,danwent/libvirt-ovs,cbosdo/libvirt,nertpinx/libvirt,foomango/libvirt,olafhering/libvirt,novel/fbsd-libvirt,bjzhang/libvirt,siboulet/libvirt-openvz,novel/fbsd-libvirt,olafhering/libvirt,siboulet/libvirt-openvz,novel/fbsd-libvirt,shugaoye/libvirt,wiedi/libvirt,foomango/libvirt,nertpinx/libvirt,elmarco/libvirt,rlaager/libvirt,jardasgit/libvirt,warewolf/libvirt,jeckersb/libvirt,eskultety/libvirt,libvirt/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,trainstack/libvirt,wiedi/libvirt,agx/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,trainstack/libvirt,shugaoye/libvirt,warewolf/libvirt,warewolf/libvirt,emaste/libvirt,datto/libvirt,emaste/libvirt,danwent/libvirt-ovs,trainstack/libvirt,VenkatDatta/libvirt,bjzhang/libvirt,jeckersb/libvirt,warewolf/libvirt,olafhering/libvirt