Getting serial port's output
Written by
You can get the information that the VM outputs to the serial port. This can be useful for troubleshooting.
Management console
CLI
API
- Select the folder the VM belongs to.
- Select Compute Cloud.
- Click on the line with the VM you need.
- Go to the Serial port tab.
- To use the Ctrl + F keyboard shortcut to search, enable Raw mode in the upper-right corner.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View the description of the command to get serial port output:
$ yc compute instance get-serial-port-output --help
-
Select a VM, for example,
first-instance
:yc compute instance list +----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4tkoa3jl6 | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7gcoji2f8s | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+
-
Get the serial port output. The serial port's output is usually long, so it should be written to a file:
$ yc compute instance get-serial-port-output first-instance > output.txt
To get the serial port output, use the getSerialPortOutput method for the Instance resource.