Reviewing the console logs
Console logs are critical for troubleshooting the startup process of an instance. These logs are produced at boot time, before the console becomes available. Typically, when working with cloud hosted instances, accessing these can be difficult. OpenStack Compute provides a mechanism for accessing the console logs.
Getting ready
To access the console logs of an instance, the following information is required:
The
openstack
command-line clientThe
openrc
file containing appropriate credentialsThe name or ID of the instance
For this example, we will view the last five lines of the cookbook.test
instance.
How to do it…
To show the console logs of an instance, use the following command:
openstack console log show --lines 5 cookbook.test
This connects to the serial console output of an instance, mimicking the information as if a monitor was directly attached to a physical server:
[[0;32m OK [0m] Started udev Coldplug all Devices. [[0;32m OK [0m] Started Dispatch Password...