diff --git a/docs/api.md b/docs/api.md index aba1d1d75..c5cba518d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -147,7 +147,7 @@ We want to create a virtual machine with the following characteristics: `/opt/clh/images/focal-server-cloudimg-amd64.raw` ```shell -#!/bin/bash +#!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i \ -X PUT 'http://localhost/api/v1/vm.create' \ @@ -167,7 +167,7 @@ curl --unix-socket /tmp/cloud-hypervisor.sock -i \ Once the VM is created, we can boot it: ```shell -#!/bin/bash +#!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.boot' ``` @@ -177,7 +177,7 @@ curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1 We can fetch information about any VM, as soon as it's created: ```shell -#!/bin/bash +#!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i \ -X GET 'http://localhost/api/v1/vm.info' \ @@ -189,7 +189,7 @@ curl --unix-socket /tmp/cloud-hypervisor.sock -i \ We can reboot a VM that's already booted: ```shell -#!/bin/bash +#!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.reboot' ``` @@ -199,7 +199,7 @@ curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1 Once booted, we can shut a VM down from the REST API: ```shell -#!/bin/bash +#!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.shutdown' ``` @@ -385,7 +385,7 @@ APIs work together, let's look at a complete VM creation flow, from the [REST API](#rest-api) in order to creates a virtual machine: ``` shell - #!/bin/bash + #!/usr/bin/env bash curl --unix-socket /tmp/cloud-hypervisor.sock -i \ -X PUT 'http://localhost/api/v1/vm.create' \ diff --git a/scripts/check-image-compatibility.sh b/scripts/check-image-compatibility.sh index 22063c827..16c84d40f 100644 --- a/scripts/check-image-compatibility.sh +++ b/scripts/check-image-compatibility.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash : ' This script checks if an image is compatible with Cloud Hypervisor. At first, it detects the image type(raw or qcow2), diff --git a/scripts/common-aarch64.sh b/scripts/common-aarch64.sh index 6db3b7a47..4b545ee32 100644 --- a/scripts/common-aarch64.sh +++ b/scripts/common-aarch64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash WORKLOADS_DIR="$HOME/workloads" diff --git a/scripts/create-cloud-init.sh b/scripts/create-cloud-init.sh index 2022c0cb2..0bc379a36 100755 --- a/scripts/create-cloud-init.sh +++ b/scripts/create-cloud-init.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x rm -f /tmp/ubuntu-cloudinit.img diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 35d6f39ca..877c24b68 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Copyright © 2020 Intel Corporation diff --git a/scripts/prepare_vdpa.sh b/scripts/prepare_vdpa.sh index 73441ebf3..2523e569a 100755 --- a/scripts/prepare_vdpa.sh +++ b/scripts/prepare_vdpa.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x sudo apt install -y libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf git make dpkg-dev libmnl-dev pkg-config iproute2 diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index 3dd38b780..10b0fe028 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_live_migration.sh b/scripts/run_integration_tests_live_migration.sh index b6f004cf1..499fd9ef4 100755 --- a/scripts/run_integration_tests_live_migration.sh +++ b/scripts/run_integration_tests_live_migration.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_rate_limiter.sh b/scripts/run_integration_tests_rate_limiter.sh index 0e78faca3..61e39d07b 100755 --- a/scripts/run_integration_tests_rate_limiter.sh +++ b/scripts/run_integration_tests_rate_limiter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_sgx.sh b/scripts/run_integration_tests_sgx.sh index d7bded779..64c729821 100755 --- a/scripts/run_integration_tests_sgx.sh +++ b/scripts/run_integration_tests_sgx.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_vfio.sh b/scripts/run_integration_tests_vfio.sh index 894cdb3f7..b9bdbff3a 100755 --- a/scripts/run_integration_tests_vfio.sh +++ b/scripts/run_integration_tests_vfio.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x # This set of vfio tests require to be ran on a specific machine with @@ -14,7 +14,7 @@ process_common_args "$@" WORKLOADS_DIR="$HOME/workloads" -download_hypervisor_fw +download_hypervisor_fw CFLAGS="" if [[ "${BUILD_TARGET}" == "x86_64-unknown-linux-musl" ]]; then diff --git a/scripts/run_integration_tests_windows_aarch64.sh b/scripts/run_integration_tests_windows_aarch64.sh index 01932a063..d74619541 100755 --- a/scripts/run_integration_tests_windows_aarch64.sh +++ b/scripts/run_integration_tests_windows_aarch64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_windows_x86_64.sh b/scripts/run_integration_tests_windows_x86_64.sh index d529af796..520c8bccf 100755 --- a/scripts/run_integration_tests_windows_x86_64.sh +++ b/scripts/run_integration_tests_windows_x86_64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index f389d7227..cec9836e0 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_metrics.sh b/scripts/run_metrics.sh index 18365848a..1c4e13646 100755 --- a/scripts/run_metrics.sh +++ b/scripts/run_metrics.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -x source $HOME/.cargo/env diff --git a/scripts/run_openapi_tests.sh b/scripts/run_openapi_tests.sh index 04ca14d59..401cc6cd1 100755 --- a/scripts/run_openapi_tests.sh +++ b/scripts/run_openapi_tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e set -x diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 1f4432208..564f7d705 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source $HOME/.cargo/env source $(dirname "$0")/test-util.sh diff --git a/scripts/test-util.sh b/scripts/test-util.sh index fa744d1f3..bacf8e040 100644 --- a/scripts/test-util.sh +++ b/scripts/test-util.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash hypervisor="kvm" test_filter=""