-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart-cvm.sh
executable file
·43 lines (36 loc) · 891 Bytes
/
start-cvm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
# Load VM configuration
source "${SCRIPT_PATH}/vm.conf"
IMAGE="--image ${CVM_IMAGE}"
function usage
{
echo -e "usage: $0 [OPTION...]"
echo -e ""
echo -e "Start QEMU Confidential VM"
echo -e ""
echo -e " --image {PATH} path to the VM disk image [default: ${CVM_IMAGE}]"
echo -e " -h, --help print this help"
}
while [ "$1" != "" ]; do
case $1 in
--image )
shift
IMAGE="--image $1"
;;
-h | --help )
usage
exit
;;
* )
echo -e "\nParameter not found: $1\n"
usage
exit 1
esac
shift
done
set -ex
${SCRIPT_PATH}/svsm/scripts/launch_guest.sh --qemu "${QEMU}" \
--proxy "${PROXY_SOCK}" \
--state "${TPM_STATE}" \
${IMAGE}