Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit d47cca6

Browse files
committed
virtiofs: Update virtiofs docs
Update this document to get rid of any nemu mentions. Added comment to mention that number of containers that can be launched may be limited by the size of `/dev/shm`. Fixes #674 Signed-off-by: Archana Shinde <[email protected]>
1 parent da83738 commit d47cca6

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

how-to/how-to-use-virtio-fs-with-kata.md

+19-9
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,49 @@ As of the 1.7 release of Kata Containers, [9pfs](https://www.kernel.org/doc/Docu
1313

1414
To help address these limitations, [virtio-fs](https://virtio-fs.gitlab.io/) has been developed. virtio-fs is a shared file system that lets virtual machines access a directory tree on the host. In Kata Containers, virtio-fs can be used to share container volumes, secrets, config-maps, configuration files (hostname, hosts, `resolv.conf`) and the container rootfs on the host with the guest. virtio-fs provides significant performance and POSIX compliance improvements compared to 9pfs.
1515

16-
Enabling of virtio-fs requires changes in the guest kernel as well as the VMM. For Kata Containers, experimental virtio-fs support is enabled through the [NEMU VMM](https://github.com/intel/nemu).
16+
Enabling of virtio-fs requires changes in the guest kernel as well as the VMM. For Kata Containers, experimental virtio-fs support is enabled through `qemu` and `cloud-hypervisor` VMMs.
1717

1818
**Note: virtio-fs support is experimental in the 1.7 release of Kata Containers. Work is underway to improve stability, performance and upstream integration. This is available for early preview - use at your own risk**
1919

2020
This document describes how to get Kata Containers to work with virtio-fs.
2121

2222
## Pre-requisites
2323

24-
* Before Kata 1.8 this feature required the host to have hugepages support enabled. Enable this with the `sysctl vm.nr_hugepages=1024` command on the host.
24+
Before Kata 1.8 this feature required the host to have hugepages support enabled. Enable this with the `sysctl vm.nr_hugepages=1024` command on the host.In later versions of Kata, virtio-fs leverages `/dev/shm` as the shared memory backend. The default size of `/dev/shm` on a system is typically half of the total system memory. This can pose a physical limit to the maximum number of pods that can be launched with virtio-fs. This can be overcome by increasing the size of `/dev/shm` as shown below:
2525

26+
```bash
27+
$ mount -o remount,size=${desired_shm_size} /dev/shm
28+
```
29+
2630
## Install Kata Containers with virtio-fs support
2731

28-
The Kata Containers NEMU configuration, the NEMU VMM and the `virtiofs` daemon are available in the [Kata Container release](https://github.com/kata-containers/runtime/releases) artifacts starting with the 1.7 release. While the feature is experimental, distribution packages are not supported, but installation is available through [`kata-deploy`](https://github.com/kata-containers/packaging/tree/master/kata-deploy).
32+
The Kata Containers `qemu` configuration with virtio-fs and the `virtiofs` daemon are available in the [Kata Container release](https://github.com/kata-containers/runtime/releases) artifacts starting with the 1.9 release. Installation is available through [distribution packages](https://github.com/kata-containers/documentation/blob/master/install/README.md#supported-distributions) as well through [`kata-deploy`](https://github.com/kata-containers/packaging/tree/master/kata-deploy).
2933

30-
Install the latest release of Kata as follows:
34+
**Note: Support for virtio-fs was first introduced in `NEMU` hypervisor in Kata 1.8 release. This hypervisor has been deprecated.**
35+
36+
Install the latest release of Kata with `kata-deploy` as follows:
3137
```
3238
docker run --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install
3339
```
3440

35-
This will place the Kata release artifacts in `/opt/kata`, and update Docker's configuration to include a runtime target, `kata-nemu`. Learn more about `kata-deploy` and how to use `kata-deploy` in Kubernetes [here](https://github.com/kata-containers/packaging/tree/master/kata-deploy#kubernetes-quick-start).
36-
41+
This will place the Kata release artifacts in `/opt/kata`, and update Docker's configuration to include a runtime target, `kata-qemu-virtiofs`. Learn more about `kata-deploy` and how to use `kata-deploy` in Kubernetes [here](https://github.com/kata-containers/packaging/tree/master/kata-deploy#kubernetes-quick-start).
3742

3843
## Run a Kata Container utilizing virtio-fs
3944

40-
Once installed, start a new container, utilizing NEMU + `virtiofs`:
45+
Once installed, start a new container, utilizing `qemu` + `virtiofs`:
4146
```bash
42-
$ docker run --runtime=kata-nemu -it busybox
47+
$ docker run --runtime=kata-qemu-virtiofs -it busybox
4348
```
4449

45-
Verify the new container is running with the NEMU hypervisor as well as using `virtiofsd`. To do this look for the hypervisor path and the `virtiofs` daemon process on the host:
50+
Verify the new container is running with the `qemu` hypervisor as well as using `virtiofsd`. To do this look for the hypervisor path and the `virtiofs` daemon process on the host:
4651
```bash
4752
$ ps -aux | grep virtiofs
4853
root ... /home/foo/build-x86_64_virt/x86_64_virt-softmmu/qemu-system-x86_64_virt
4954
... -machine virt,accel=kvm,kernel_irqchip,nvdimm ...
5055
root ... /home/foo/build-x86_64_virt/virtiofsd-x86_64 ...
5156
```
57+
58+
You can also try out virtio-fs using `cloud-hypervisor` VMM:
59+
```bash
60+
$ docker run --runtime=kata-clh -it busybox
61+
```

0 commit comments

Comments
 (0)