Skip to content

Commit

Permalink
[dist] fix worker VM autodetection
Browse files Browse the repository at this point in the history
check also that the needed executables are available
  • Loading branch information
adrianschroeter committed May 12, 2016
1 parent 8e3eb2c commit 4c68023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/obsworker
Expand Up @@ -137,10 +137,10 @@ if [ -n "$OBS_VM_TYPE" -a "$OBS_VM_TYPE" != "auto" ] ; then
elif [ "$OBS_VM_TYPE" != "none" ] ; then
vmopt="--$OBS_VM_TYPE"
fi
elif [ -e /dev/kvm ] ; then
elif [ -e /dev/kvm -a -x /usr/bin/qemu-kvm ] ; then
vmopt=--kvm
OBS_VM_TYPE="kvm"
elif [ -e /sys/hypervisor/type ] && grep -q xen /sys/hypervisor/type; then
elif [ -e /sys/hypervisor/type ] && [ -x /usr/sbin/xl -o -x /usr/sbin/xm ] && grep -q xen /sys/hypervisor/type; then
vmopt=--xen
OBS_VM_TYPE="xen"
fi
Expand Down

1 comment on commit 4c68023

@mmohring
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example on aarch64 not /usr/bin/qemu-kvm is called but /usr/bin/qemu-system-aarch64. Take a look into the build script in build/build-vm-kvm at vm_verify_options_kvm() . So this wont work there, qemu-kvm does not exist there.

Please sign in to comment.