diff options
author | Adin Scannell <ascannell@google.com> | 2020-07-09 16:59:42 -0700 |
---|---|---|
committer | Adin Scannell <ascannell@google.com> | 2020-07-09 16:59:42 -0700 |
commit | 5471dbe2f36976eb61f8c8fe8eaafd5da0569779 (patch) | |
tree | 08fa0f9691189012085c5a515dd81dea46a105e2 /shim/configure-gvisor-containerd-shim.md | |
parent | 5946f111827fa4e342a2e6e9c043c198d2e5cb03 (diff) | |
parent | 7f8172edf583e0d26bee5e06578a442c7507ba6f (diff) |
Merge gvisor-containerd-shim
Diffstat (limited to 'shim/configure-gvisor-containerd-shim.md')
-rw-r--r-- | shim/configure-gvisor-containerd-shim.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/shim/configure-gvisor-containerd-shim.md b/shim/configure-gvisor-containerd-shim.md new file mode 100644 index 000000000..40151da56 --- /dev/null +++ b/shim/configure-gvisor-containerd-shim.md @@ -0,0 +1,42 @@ +# Configure gvisor-containerd-shim (Shim V1) + +This document describes how to configure runtime options for `gvisor-containerd-shim`. + +The shim configuration is stored in `/etc/containerd/gvisor-containerd-shim.toml`. The configuration file supports two values. + +`runc_shim`: The path to the runc shim. This is used by the gvisor-containerd-shim to run normal containers. +`runsc_config`: This is a set of key/value pairs that are converted into `runsc` command line flags. You can learn more about which flags are available by running `runsc flags`. + +## Example: Enable the KVM platform + +gVisor enables the use of a number of platforms. This configuration enables the +KVM platform. + +Find out more about platform in the +(gVisor documentation)[https://gvisor.dev/docs/user_guide/platforms/]. + +```shell +cat <<EOF | sudo tee /etc/containerd/gvisor-containerd-shim.toml +[runsc_config] +platform = "kvm" +EOF +``` + +## Example: Enable gVisor debug logging + +gVisor debug logging can be enabled by setting the `debug` and `debug-log` +flag. The shim will replace "%ID%" with the container ID in the path of the +`debug-log` flag. + +Find out more about debugging in the +(gVisor documentation)[https://gvisor.dev/docs/user_guide/debugging/]. + +```shell +cat <<EOF | sudo tee /etc/containerd/gvisor-containerd-shim.toml +# This is the path to the default runc containerd-shim. +runc_shim = "/usr/local/bin/containerd-shim" +[runsc_config] + debug=true + debug-log=/var/log/%ID%/gvisor.log +EOF +``` |