This repository was archived by the owner on Jun 28, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 10
10
# Place where virtcontainers keeps its active pod info
11
11
VC_POD_DIR=" ${VC_POD_DIR:-/ var/ lib/ vc/ sbs} "
12
12
13
+ KATA_HYPERVISOR=" ${KATA_HYPERVISOR:- qemu} "
14
+
13
15
die (){
14
16
msg=" $* "
15
17
echo " ERROR: $msg " >&2
@@ -42,7 +44,11 @@ extract_kata_env(){
42
44
SHIM_VERSION=" 0.0.0"
43
45
PROXY_PATH=" /usr/libexec/kata-containers/kata-proxy"
44
46
PROXY_VERSION=" 0.0.0"
45
- HYPERVISOR_PATH=" /usr/bin/qemu-system-x86_64"
47
+ if [ " $KATA_HYPERVISOR " == firecracker ]; then
48
+ HYPERVISOR_PATH=" /usr/bin/firecracker"
49
+ else
50
+ HYPERVISOR_PATH=" /usr/bin/qemu-system-x86_64"
51
+ fi
46
52
HYPERVISOR_VERSION=" 0.0.0"
47
53
INITRD_PATH=" "
48
54
NETMON_PATH=" /usr/libexec/kata-containers/kata-netmon"
@@ -73,7 +79,13 @@ extract_kata_env(){
73
79
# Checks that processes are not running
74
80
check_processes () {
75
81
extract_kata_env
76
- general_processes=( ${PROXY_PATH} ${HYPERVISOR_PATH} ${SHIM_PATH} )
82
+ vsock_configured=$( $RUNTIME_PATH kata-env | awk ' /UseVSock/ {print $3}' )
83
+ vsock_supported=$( $RUNTIME_PATH kata-env | awk ' /SupportVSock/ {print $3}' )
84
+ if [ " $vsock_configured " == true ] && [ " $vsock_supported " == true ]; then
85
+ general_processes=( ${HYPERVISOR_PATH} ${SHIM_PATH} )
86
+ else
87
+ general_processes=( ${PROXY_PATH} ${HYPERVISOR_PATH} ${SHIM_PATH} )
88
+ fi
77
89
for i in " ${general_processes[@]} " ; do
78
90
if pgrep -f " $i " ; then
79
91
die " Found unexpected ${i} present"
You can’t perform that action at this time.
0 commit comments