Getting the serial port output
You can get the output from a VM serial port and use it, e.g., for troubleshooting.
To access the output data, you need the compute.operator or viewer role.
- Select the folder the VM belongs to.
- Select Compute Cloud.
- Click the line with the VM in question.
- Go to the Serial port tab.
- To use the CTRL + F shortcut to search, enable Raw mode in the top-right corner.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
-
See the description of the command for getting the serial port output:
yc compute instance get-serial-port-output --help -
Select a VM, e.g.,
first-instance:yc compute instance listResult:
+----------------------+-----------------+---------------+---------+----------------------+ | ID | NAME | ZONE ID | STATUS | DESCRIPTION | +----------------------+-----------------+---------------+---------+----------------------+ | fhm0b28lgfp4******** | first-instance | ru-central1-a | RUNNING | my first vm via CLI | | fhm9gk85nj7g******** | second-instance | ru-central1-a | RUNNING | my second vm via CLI | +----------------------+-----------------+---------------+---------+----------------------+ -
Get its serial port output. Since the serial port output is usually lengthy, we recommend writing it to a file:
yc compute instance get-serial-port-output first-instance > output.txt
To get the serial port output, use the getSerialPortOutput REST API method for the Instance resource or the InstanceService/GetSerialPortOutput gRPC API call.