在哪里可以找到我的 Compute Engine 启动脚本的日志?

Where can I find logs of my Compute Engine startup script?

我认为我有一个启动脚本失败了,但是我在哪里可以找到它的日志?它似乎没有出现在 StackDriver 中。我的启动脚本如下所示:

#!/bin/bash

pwd
whoami

sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096

docker run -d --name sonarqube \
  -p 80:9000 \
  -e sonar.jdbc.username=xxx \
  -e sonar.jdbc.password=xxx \
  -e sonar.jdbc.url=xxx \
  sonarqube:latest

当 Compute Engine 启动时,您会在串行日志中找到启动日志。您可以在此处阅读有关串行日志的信息:

https://cloud.google.com/compute/docs/instances/interacting-with-serial-console