diff --git a/doc/tutorials/run_kata_containers.rst b/doc/tutorials/run_kata_containers.rst index 64d5b51a7..e5ae369b4 100644 --- a/doc/tutorials/run_kata_containers.rst +++ b/doc/tutorials/run_kata_containers.rst @@ -8,14 +8,16 @@ This tutorial describes how to install, configure, and run `Kata Containers Kata Containers leverage the ACRN hypervisor instead of QEMU which is used by default. Refer to the `Kata Containers with ACRN `_ -presentation from a previous ACRN Project Technical Community Meeting for more -details on Kata Containers and how the integration with ACRN has been done. +presentation from a previous ACRN Project Technical Community Meeting for +more details on Kata Containers and how the integration with ACRN has been +done. -Pre-Requisites +Prerequisites ************** #. Refer to the :ref:`ACRN supported hardware `. -#. For a default prebuilt ACRN binary in the E2E package, you must have 4 CPU cores or enable "CPU Hyper-Threading” in order to have 4 CPU threads for 2 CPU cores. +#. For a default prebuilt ACRN binary in the E2E package, you must have 4 + CPU cores or enable "CPU Hyper-Threading" in order to have 4 CPU threads for 2 CPU cores. #. Follow :ref:`these instructions ` to set up the ACRN Service VM. @@ -31,36 +33,36 @@ Install Docker Install Kata Containers *********************** -The Kata Containers installation from Clear Linux's official repository does not -work with ACRN at the moment, we therefore install Kata Containers using the -`manual installation `_ -instructions (using a ``rootfs`` image). +The Kata Containers installation from Clear Linux's official repository does +not work with ACRN at the moment. Therefore, you must install Kata +Containers using the `manual installation `_ instructions (using a ``rootfs`` image). -#. Install the build dependencies +#. Install the build dependencies. .. code-block:: none $ sudo swupd bundle-add go-basic devpkg-elfutils -#. Install Kata Containers +#. Install Kata Containers. At a high level, the `manual installation `_ steps are: - #. Build and install the Kata runtime - #. Create and install a ``rootfs`` - #. Build and install the Kata Containers kernel - #. Build and install the Kata proxy - #. Build and install the Kata shim + #. Build and install the Kata runtime. + #. Create and install a ``rootfs``. + #. Build and install the Kata Containers kernel. + #. Build and install the Kata proxy. + #. Build and install the Kata shim. Configure Kata on ACRN ********************** -With the core components installed on the system, the next step is to configure -them to work seamlessly together. There are two parts to this. +After the core components are installed on the system, the next step is to +configure them to work seamlessly together. This includes two parts. #. `Configure Docker `_ - to recognize the ``kata-runtime`` as an additional runtime available for use. + to recognize the ``kata-runtime`` as an additional runtime available for + use. #. Configure Kata to use ACRN. @@ -69,13 +71,16 @@ them to work seamlessly together. There are two parts to this. $ sudo mkdir -p /etc/kata-containers $ sudo cp /usr/share/defaults/kata-containers/configuration-acrn.toml /etc/kata-containers/configuration.toml -You can verify that these configurations are effective by checking the following outputs: +Verify that these configurations are effective by checking the following +outputs: .. code-block:: none $ sudo docker info | grep runtime - WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release. - WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use. + WARNING: the devicemapper storage-driver is deprecated, and will be + removed in a future release. + WARNING: devicemapper: usage of loopback devices is strongly discouraged + for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device. Runtimes: kata-runtime runc @@ -97,10 +102,10 @@ You can verify that these configurations are effective by checking the following Run a Kata Container with ACRN ****************************** -The system is now ready to run a Kata Container on ACRN (a reboot is recommended -after the installation). +The system is now ready to run a Kata Container on ACRN. Note that a reboot +is recommended after the installation. -Before running a Kata Container on ACRN, you must offline at least one CPU. +Before running a Kata Container on ACRN, you must offline at least one CPU: .. code-block:: none @@ -108,12 +113,12 @@ Before running a Kata Container on ACRN, you must offline at least one CPU. $ chmod +x ./offline_cpu.sh $ sudo ./offline_cpu.sh -Now start a Kata Container on ACRN. +Start a Kata Container on ACRN: .. code-block:: none $ sudo docker run -ti --runtime=kata-runtime busybox sh -If you run into problems, contact us on the mailing list and provide as much -details as possible about the issue. The output of ``sudo docker info`` and -``kata-runtime kata-env`` is useful. +If you run into problems, contact us on the ACRN mailing list and provide as +much detail as possible about the issue. The output of ``sudo docker info`` +and ``kata-runtime kata-env`` is useful.