Skip to content

Commit d62837a

Browse files
committed
ci: Add virtio-fs support
Add configuration option to use virtio-fs. We will currently use nemu for testing the virtio-fs support. Depends-on: github.com/kata-containers/runtime#1016 Depends-on: github.com/kata-containers/packaging#484 Fixes: kata-containers#1536. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
1 parent 821649a commit d62837a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.ci/install_nemu.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ install_nemu() {
3131
;;
3232
esac
3333

34+
local virtiofs_bin="virtiofsd-${arch}"
35+
3436
curl -LO "${nemu_repo}/releases/download/${nemu_version}/${nemu_bin}"
37+
curl -LO "${nemu_repo}/releases/download/${nemu_version}/${virtiofs_bin}"
38+
3539
sudo install -o root -g root -m 0755 "${nemu_bin}" "/usr/local/bin"
36-
rm -rf "${nemu_bin}"
40+
sudo install -o root -g root -m 0755 "${virtiofs_bin}" "/usr/local/bin"
41+
rm -rf "${nemu_bin}" "${virtiofs_bin}"
3742
}
3843

3944
install_firmware() {

.ci/install_runtime.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,14 @@ if [ "$KATA_EXPERIMENTAL_FEATURES" = true ]; then
121121
feature="newstore"
122122
sudo sed -i -e "s|^experimental.*$|experimental=[ \"$feature\" ]|" "${runtime_config_path}"
123123
fi
124+
125+
# Enable virtiofs if VIRTIO_FS is set to true
126+
# currently we use nemu for virtiofs testing
127+
if [ "$VIRTIO_FS" = true ] && [ "$KATA_HYPERVISOR" = "nemu" ]; then
128+
echo "Configure virtio-fs on kata-runtime config file"
129+
sudo crudini --set "$runtime_config_path" hypervisor.qemu virtio_fs_daemon "\"/usr/local/bin/virtiofsd-${arch}\""
130+
sudo crudini --set "$runtime_config_path" hypervisor.qemu shared_fs "\"virtio-fs\""
131+
sudo crudini --set "$runtime_config_path" hypervisor.qemu enable_hugepages "true"
132+
133+
sudo sysctl -w vm.nr_hugepages=1024
134+
fi

0 commit comments

Comments
 (0)