mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
tests/vfio: Configure a value for 'hot_plug_vfio' for both vmms
This shouldn't be hiding behind only a qemu check, we need this for clh as well. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
bfc93927fb
commit
b46b0ecf8b
@ -188,13 +188,18 @@ setup_configuration_file() {
|
||||
if [ -n "$MACHINE_TYPE" ]; then
|
||||
if [ "$HYPERVISOR" = "qemu" ]; then
|
||||
sed -i 's|^machine_type.*|machine_type = "'${MACHINE_TYPE}'"|g' "${kata_config_file}"
|
||||
# Make sure we have set hot_plug_vfio to a reasonable value
|
||||
sudo sed -i -e 's|^#hot_plug_vfio =.*$|hot_plug_vfio = "bridge-port"|' -e 's|^hot_plug_vfio = .*$|hot_plug_vfio = "bridge-port"|' "${kata_config_file}"
|
||||
else
|
||||
warn "Variable machine_type only applies to qemu. It will be ignored"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Make sure we have set hot_plug_vfio to a reasonable value
|
||||
if [ "$HYPERVISOR" = "qemu" ]; then
|
||||
sed -i -e 's|^#*.*hot_plug_vfio.*|hot_plug_vfio = "bridge-port"|' "${kata_config_file}"
|
||||
elif [ "$HYPERVISOR" = "clh" ]; then
|
||||
sed -i -e 's|^#*.*hot_plug_vfio.*|hot_plug_vfio = "root-port"|' "${kata_config_file}"
|
||||
fi
|
||||
|
||||
if [ -n "${SANDBOX_CGROUP_ONLY}" ]; then
|
||||
sed -i 's|^sandbox_cgroup_only.*|sandbox_cgroup_only='${SANDBOX_CGROUP_ONLY}'|g' "${kata_config_file}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user