diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py index e78932d55b..0ed11d7f73 100755 --- a/devstack/tools/ironic/scripts/configure-vm.py +++ b/devstack/tools/ironic/scripts/configure-vm.py @@ -110,10 +110,15 @@ def main(): if args.emulator: params['emulator'] = args.emulator else: - if os.path.exists("/usr/bin/kvm"): # Debian - params['emulator'] = "/usr/bin/kvm" - elif os.path.exists("/usr/bin/qemu-kvm"): # Redhat - params['emulator'] = "/usr/bin/qemu-kvm" + qemu_kvm_locations = ['/usr/bin/kvm', + '/usr/bin/qemu-kvm', + '/usr/libexec/qemu-kvm'] + for location in qemu_kvm_locations: + if os.path.exists(location): + params['emulator'] = location + break + else: + raise RuntimeError("Unable to find location of kvm executable") if args.console_log: params['console'] = CONSOLE_LOG % {'console_log': args.console_log}