kata-containers/utils
James O. D. Hunt 1ac3caf656 kata-manager: Allow hypervisor to be changed
Add new options to allow the configured hypervisor to be changed:

- `-L`: List available _packaged_ hypervisor config short names.
- `-e`: List available _local_ hypervisor config names.
- `-H <hypervisor>`: Install Kata then switch to the specified hypervisor.
- `-S <hypervisor>`: Switch to the specified hypervisor (by config short name [Errors if Kata not installed]).

For example, to install Kata and configure it to use Cloud Hypervisor
with the golang Kata runtime:

```bash
$ kata-manager.sh -H clh
```

To switch back to the default hypervisor:

```bash
$ kata-manager.sh -S default
```

To show details of the available packaged configs:

```bash
$ kata-manager.sh -L
```

To show details of the local configs:

```bash
$ kata-manager.sh -e
```

> **Notes:**
>
> - This change **only** applies to the current default (golang) Kata runtime.
>
> - Although this is mainly for users wishing to switch hypervisor (by
>   changing the Kata config file to another of the packaged config files
>   provided for specific hypervisors), strictly it allows users to change
>   to _any_ config file. For example, if the user has a config file called
>   `/etc/kata-containers/configuration-my-custom-config.toml`, they could
>   switch to this by running:
>
>   ```bash
>   $ kata-manager.sh -S my-custom-config
>   ```
>
> - The "config short names" are the hypervisor specific part of the configuration file name.
>   For example, the config short name for file `configuration-qemu.toml` is
>   `qemu` and the config short name for `configuration-clh.toml` is `clh`.

Fixes: #8305.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2024-03-04 12:18:00 +00:00
..
kata-manager.sh kata-manager: Allow hypervisor to be changed 2024-03-04 12:18:00 +00:00
README.md docs: Remove warning for cgroupsv2 only operating systems 2023-12-13 09:18:39 +01:00

Utilities

Kata Manager

Note:

We recommend users install Kata Containers using official distribution packages, where available.

The kata-manager.sh script automatically installs and configures Kata Containers and containerd.

This scripted method installs the latest versions of Kata Containers and containerd. However, be aware of the following before proceeding:

  • Packages will not be automatically updated

    Since a package manager is not being used, it is your responsibility to ensure these packages are kept up-to-date when new versions are released to ensure you are using a version that includes the latest security and bug fixes.

  • Potentially untested versions or version combinations

    This script installs the newest versions of Kata Containers and containerd from binary release packages. These versions may not have been tested with your distribution version.

If you still wish to continue, but prefer a manual installation, see the containerd installation guide.

Install a minimal Kata Containers system

By default, the script will attempt to install Kata Containers and containerd, and then configure containerd to use Kata Containers. However, the script provides a number of options to allow you to change its behaviour.

Note:

Before running the script to install Kata Containers, we recommend that you review the available options.

Show available options

To show the available options without installing anything, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -h"

To install Kata Containers only

If your system already has containerd installed, to install Kata Containers and only configure containerd, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh) -o"

To install Kata Containers and containerd

To install and configure a system with Kata Containers and containerd, run:

$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/kata-containers/main/utils/kata-manager.sh)"