Viewing the Console Output of a VM
You can view the console output of a virtual machine (VM), for example to troubleshoot kernel problems or system errors. The console provides the most recent 64 KiB output.
On Windows VMs, the console is accessible only on the first boot. It returns no output after the first reboot.
Viewing the Console Output of a VM Using Cockpit v2
-
In the VMs dashboard, check the box of the VM whose console output you want to view.
The VM is selected. -
Click Console Output.
The CONSOLE OUTPUT dialog box appears.By default, the console output is automatically refreshed every 3 seconds but you can disable the auto-refresh.
Viewing the Console Output of a VM Using OSC CLI
The ReadConsoleOutput command gets the console output for a virtual machine (VM). This console is not in real-time. It is refreshed every two seconds and provides the most recent 64 KiB output.
On Windows VMs, the console is handled only on the first boot. It returns no output after the first boot. |
$ osc-cli api ReadConsoleOutput --profile "default" \
--VmId "i-12345678"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
VmId
: The ID of the VM.
The ReadConsoleOutput command returns the following elements:
-
ConsoleOutput
: The Base64-encoded output of the console. If a command line tool is used, the output is decoded by the tool. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
VmId
: The ID of the VM.
{
"VmId": "i-12345678",
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ConsoleOutput": "..."
}
Viewing the Console Output of a VM Using oapi-cli
The ReadConsoleOutput command gets the console output for a virtual machine (VM). This console is not in real-time. It is refreshed every two seconds and provides the most recent 64 KiB output.
On Windows VMs, the console is handled only on the first boot. It returns no output after the first boot. |
$ oapi-cli --profile "default" ReadConsoleOutput \
--VmId "i-12345678"
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
VmId
: The ID of the VM.
The ReadConsoleOutput command returns the following elements:
-
ConsoleOutput
: The Base64-encoded output of the console. If a command line tool is used, the output is decoded by the tool. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
VmId
: The ID of the VM.
{
"VmId": "i-12345678",
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"ConsoleOutput": "..."
}
Viewing the Console Output of an Instance Using AWS CLI
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To view the console output of an instance, use the get-console-output command following this syntax:
$ aws ec2 get-console-output \
--profile YOUR_PROFILE \
--instance-id i-12345678 \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
instance-id
: The ID of the instance. -
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The get-console-output command returns the following elements:
-
InstanceID
: The ID of the instance. -
Output
: The console output, decoded from its original Base64-encoded form. -
Timestamp
: The time the output was updated for the last time, in ISO 8601 format.
{
"InstanceId": "i-12345678",
"Output": "...",
"Timestamp": "2018-01-01T13:00:00.176Z"
}
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.