doc: add more details to the Kata Containers with ACRN tutorial

* Add more details about Kata Containers and ACRN in the introduction
* Adjust and correct some of the instructions

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
Geoffroy Van Cutsem 2019-12-27 13:44:28 +01:00 committed by deb-intel
parent 933e2178d0
commit e25a2bf80c
1 changed files with 14 additions and 8 deletions

View File

@ -1,10 +1,15 @@
.. _run-kata-containers: .. _run-kata-containers:
Run Kata containers on a Service VM Run Kata Containers on a Service VM
################################### ###################################
This tutorial describes how to install, configure, and run Kata containers on This tutorial describes how to install, configure, and run `Kata Containers
the ACRN Service VM. <https://katacontainers.io/>`_ on the ACRN Service VM. In this configuration,
Kata Containers leverage the ACRN hypervisor instead of QEMU which is used by
default. Refer to the `Kata Containers with ACRN
<https://drive.google.com/file/d/1ZrqM5ouWUJA0FeIWhU_aitEJe8781rpe/view?usp=sharing>`_
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 Pre-Requisites
************** **************
@ -15,16 +20,14 @@ Pre-Requisites
#. Refer to the :ref:`ACRN supported hardware <hardware>`. #. Refer to the :ref:`ACRN supported hardware <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 <quick-setup-guide>` to set up the ACRN Service VM. #. Follow :ref:`these instructions <quick-setup-guide>` to set up the ACRN Service VM.
#. Build the ACRN kernel to enable the ``macvtap`` function: #. Build the ACRN kernel (required to support ``macvtap``, enabled by default since `247a3ba9243b <https://github.com/projectacrn/acrn-kernel/commit/247a3ba9243b1fd8c2d763158d55f8791a9cac94>`_)
.. code-block:: none .. code-block:: none
$ git clone https://github.com/projectacrn/acrn-kernel.git $ git clone https://github.com/projectacrn/acrn-kernel.git
$ cd acrn-kernel $ cd acrn-kernel
$ cp kernel_config_sos .config $ cp kernel_config_sos .config
$ sed -i "s/# CONFIG_MACVLAN is not set/CONFIG_MACVLAN=y/" .config $ make clean && make olddefconfig && make && make modules_install INSTALL_MOD_PATH=out/
$ sed -i '$ i CONFIG_MACVTAP=y' .config
$ make clean && make olddefconfig && make && sudo make modules_install INSTALL_MOD_PATH=out/
Log in to the Service VM and use the new ACRN kernel: Log in to the Service VM and use the new ACRN kernel:
@ -36,7 +39,10 @@ Pre-Requisites
$ conf_file=`sed -n '$ s/default //p' /mnt/loader/loader.conf`.conf $ conf_file=`sed -n '$ s/default //p' /mnt/loader/loader.conf`.conf
$ kernel_img=`sed -n 2p /mnt/loader/entries/$conf_file | cut -d'/' -f4` $ kernel_img=`sed -n 2p /mnt/loader/entries/$conf_file | cut -d'/' -f4`
$ sed -i "s/$kernel_img/bzImage/g" /mnt/loader/entries/$conf_file $ sed -i "s/$kernel_img/bzImage/g" /mnt/loader/entries/$conf_file
$ sync && umount /mnt && sudo reboot $ sync && sudo umount /mnt && reboot
.. note::
Adjust the EFI System Partition (ESP) device node (``/dev/sda1`` in the example above) to match your system setup.
Configure Kata on ACRN Configure Kata on ACRN
********************** **********************