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.
-
Enable debug in
configuration.toml$ enable_debug = true -
Run a container to generate the logs
$ sudo docker run -ti busybox true -
Filter the kernel boot logs from the
cc-proxylogsThe
cc-proxylogs show the sources of its collated information. To see the kernel boot logs, filtercc-proxylogs by the QEMU serial console. The QEMU serial console is represented bysource=qemu.$ journalctl -u cc-proxy | grep source=qemu -
Obtain logs using standalone
cc-proxyIn some cases it may be easier to run the
cc-proxystandalone by first stopping thecc-proxyservice and running it standalone to capture the logs.$ sudo systemctl stop cc-proxy $ sudo /usr/libexec/clear-containers/cc-proxy -log debugThis will result in the
cc-proxylog being printed on the terminal. This method can also be used to capture the logs in a specificcc-proxyfile. -
Connect to the Virtual machine console
If the kernel boots successfully then the virtual machine console can be accessed for further debug.
socat /run/virtcontainers/pods/<pod id>/console.sock