forked from clearcontainers/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request clearcontainers#595 from mcastelino/topic/docs
Docs: Add documentation for obtaining VM Kernel logs
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Get cc-runtime Kernel logs | ||
|
||
The `cc-runtime` launches a virtual machine when a new pod is | ||
created. This virtual machine (VM) uses a custom kernel inside the VM. | ||
|
||
The kernel boot logs are disabled by default. However these logs may be desired | ||
when the kernel is customized by the end user, or if the virtual machine boot | ||
fails due to the kernel. | ||
|
||
To provide a debug log of the kernel boot, Clear Containers supports an option | ||
to enable kernel boot logs using the configuration file. | ||
|
||
1. Enable debug in `configuration.toml` | ||
|
||
``` | ||
$ enable_debug = true | ||
``` | ||
|
||
2. Run a container to generate the logs | ||
|
||
``` | ||
$ sudo docker run -ti busybox true | ||
``` | ||
|
||
3. Filter the kernel boot logs from the `cc-proxy` logs | ||
|
||
The `cc-proxy` logs show the sources of its collated information. To see | ||
the kernel boot logs, filter `cc-proxy` logs by the QEMU serial console. | ||
The QEMU serial console is represented by `source=qemu`. | ||
|
||
``` | ||
$ journalctl -u cc-proxy | grep source=qemu | ||
``` | ||
|
||
4. Obtain logs using standalone `cc-proxy` | ||
|
||
In some cases it may be easier to run the `cc-proxy` standalone by first stopping | ||
the `cc-proxy` service and running it standalone to capture the logs. | ||
|
||
``` | ||
$ sudo systemctl stop cc-proxy | ||
$ sudo /usr/libexec/clear-containers/cc-proxy -log debug | ||
``` | ||
|
||
This will result in the `cc-proxy` log being printed on the terminal. This method | ||
can also be used to capture the logs in a specific `cc-proxy` file. |