问题
We got a weird error event last night where a GCE VM instance got terminated by the system for reasons that are unclear. Is there any way to identify why a running instance got terminated?
Portion of the REST response from the GCE service:
{
"kind": "compute#operation",
"operationType": "compute.instances.guestTerminate",
"status": "DONE",
"statusMessage": "Instance terminated by guest OS shutdown.",
"user": "system",
}
回答1:
In this case, it appears that your instance's guest OS itself was the one which requested to shutdown / halt so the instance was terminated as a result. This could be due to any number of reasons, e.g., someone ran a command such as shutdown -h now
inside the VM.
The record of what happened in this case may be left on the instance's persistent disk; however, if the VM had the setting enabled for automatically deleting the boot disk on VM instance termination, it's likely gone at this time.
来源:https://stackoverflow.com/questions/27685901/gce-instance-terminated-without-detail-or-clarification