mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
metrics: Fix retrieving hypervisor version on metrics
This PR makes use of sudo to retrieve the hypervisor version. Fixes: #7178 Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
parent
ce8e3cc091
commit
32cba7e44a
@ -89,7 +89,7 @@ extract_kata_env() {
|
||||
HYPERVISOR_PATH=$(kata-runtime kata-env --json | jq -r .Hypervisor.Path)
|
||||
# TODO: there is no kata-runtime of rust version currently
|
||||
if [ "${KATA_HYPERVISOR}" != "dragonball" ]; then
|
||||
HYPERVISOR_VERSION=$(${HYPERVISOR_PATH} --version | head -n1)
|
||||
HYPERVISOR_VERSION=$(sudo -E ${HYPERVISOR_PATH} --version | head -n1)
|
||||
fi
|
||||
VIRTIOFSD_PATH=$(kata-runtime kata-env --json | jq -r .Hypervisor.VirtioFSDaemon)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user