Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
ci: Add virtio-fs support
Browse files Browse the repository at this point in the history
Add configuration option to use virtio-fs.
We will currently use nemu for testing the
virtio-fs support.

Fixes: #1536.

Signed-off-by: Salvador Fuentes <[email protected]>
  • Loading branch information
chavafg committed May 16, 2019
1 parent 821649a commit ee458d2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .ci/install_nemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ install_nemu() {
;;
esac

local virtiofs_bin="virtiofsd-${arch}"

curl -LO "${nemu_repo}/releases/download/${nemu_version}/${nemu_bin}"
curl -LO "${nemu_repo}/releases/download/${nemu_version}/${virtiofs_bin}"

sudo install -o root -g root -m 0755 "${nemu_bin}" "/usr/local/bin"
rm -rf "${nemu_bin}"
sudo install -o root -g root -m 0755 "${virtiofs_bin}" "/usr/local/bin"
rm -rf "${nemu_bin}" "${virtiofs_bin}"
}

install_firmware() {
Expand Down
14 changes: 14 additions & 0 deletions .ci/install_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,17 @@ if [ "$KATA_EXPERIMENTAL_FEATURES" = true ]; then
feature="newstore"
sudo sed -i -e "s|^experimental.*$|experimental=[ \"$feature\" ]|" "${runtime_config_path}"
fi

# Enable virtiofs if VIRTIO_FS is set to true
# currently we use nemu for virtiofs testing
if [ "$VIRTIO_FS" = true ] && [ "$KATA_HYPERVISOR" = "nemu" ]; then
echo "Configure virtio-fs on kata-runtime config file"
sudo crudini --set "$runtime_config_path" hypervisor.qemu virtio_fs_daemon "\"/usr/local/bin/virtiofsd-${arch}\""
sudo crudini --set "$runtime_config_path" hypervisor.qemu shared_fs "\"virtio-fs\""
sudo crudini --set "$runtime_config_path" hypervisor.qemu enable_hugepages "true"
# Use a small cache size for virtio_fs as CI machines are small.
sudo crudini --set "$runtime_config_path" hypervisor.qemu virtio_fs_cache_size "1024"
sudo crudini --set "$runtime_config_path" hypervisor.qemu default_memory "512"

sudo sysctl -w vm.nr_hugepages=1024
fi

0 comments on commit ee458d2

Please sign in to comment.