启动脚本 - CentOS 8 - yum install - 首次启动时无网络

启动脚本 - CentOS 8 - yum install - 首次启动时无网络

我正在努力让启动脚本在虚拟机启动时运行。我有脚本,它可以运行,但第一次启动时网络似乎没有完全启动。它会创建一个临时文件,但无法 yum install。如果我第二次启动机器,它会运行。我验证了它确实在运行,因为“Ran”语句将转到 /root/startup。

#!/bin/bash

if ! type cloud-init > /dev/null 2>&1 ; then

echo "Ran - `date`" >> /root/startup
  (echo "Ran - `date`" >> /root/startup && sleep 10 && echo "Ran - `date`" >> /root/startup && yum install -y cloud-init && systemctl enable cloud-init && systemctl start cloud-init && reboot) &
fi

睡眠似乎没有帮助。

我不太清楚为什么它无法访问。也许启动脚本运行得太早了?

2019-11-14T19:36:44Z DDEBUG 命令:dnf install -y cloud-init 2019-11-14T19:36:44Z DDEBUG Installroot:/ 2019-11-14T19:36:44Z DDEBUG Releasever:8 2019-11-14T19:36:44Z DEBUG cachedir:/var/cache/dnf 2019-11-14T19:36:44Z DDEBUG 基本命令:install 2019-11-14T19:36:44Z DDEBUG 额外命令:['install', '-y', 'cloud-init'] 2019-11-14T19:36:45Z DEBUG repo:从远程下载:AppStream 2019-11-14T19:37:13Z DEBUG 错误:Curl 错误 (7):无法连接到服务器 http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [无法连接到mirrorlist.centos.org 端口80:连接超时](http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock). 2019-11-14T19:37:13Z DEBUG 无法下载'http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock':无法准备内部镜像列表:Curl 错误(7):无法连接到服务器 http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [无法连接到mirrorlist.centos.org 端口80:连接超时]。

gcloud compute instances create test123-15 --machine-type f1-micro --image-project centos-cloud --image-family centos-8 --metadata-from-file user-data=cloud-init.yaml,startup-script=cloud-bootstrap.sh

有趣的是,当我将图像更改为 centos-7 时,我取得了一些成功。这是碰运气。第一次成功了。

答案1

我已经检查了你的启动脚本并且它可以正常工作,centos-8-v20210122图像没有任何问题。

请查看在串行端口 1(控制台)收集的日志数据:

...
Feb  5 12:24:14 test123-15 systemd[1]: NetworkManager-dispatcher.service: Succeeded.
Feb  5 12:24:15 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:15 GCEMetadataScripts: startup-script: CentOS Linux 8 - AppStream                       23 MB/s | 6.3 MB     00:00
Feb  5 12:24:17 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:17 GCEMetadataScripts: startup-script: CentOS Linux 8 - BaseOS                         4.2 MB/s | 2.3 MB     00:00
Feb  5 12:24:18 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:18 GCEMetadataScripts: startup-script: CentOS Linux 8 - Extras                          21 kB/s | 8.6 kB     00:00
Feb  5 12:24:20 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:20 GCEMetadataScripts: startup-script: Google Compute Engine                           3.7 kB/s | 7.4 kB     00:02
Feb  5 12:24:22 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:22 GCEMetadataScripts: startup-script: Google Cloud SDK                                 14 MB/s |  25 MB     00:01
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Dependencies resolved.
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: ================================================================================
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  Package                 Arch   Version                         Repo       Size
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: ================================================================================
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Installing:
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  cloud-init              noarch 19.4-11.el8_3.1                 appstream 945 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Installing dependencies:
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  checkpolicy             x86_64 2.9-1.el8                       baseos    348 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-asn1crypto      noarch 0.24.0-3.el8                    baseos    181 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-audit           x86_64 3.0-0.17.20191104git1c2f876.el8 baseos     86 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-babel           noarch 2.5.1-5.el8                     appstream 4.8 M
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-cffi            x86_64 1.11.5-5.el8                    baseos    237 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-chardet         noarch 3.0.4-7.el8                     baseos    195 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-cryptography    x86_64 2.3-3.el8                       baseos    510 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-idna            noarch 2.5-5.el8                       baseos     97 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-jinja2          noarch 2.10.1-2.el8_0                  appstream 538 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-jsonpatch       noarch 1.21-2.el8                      appstream  27 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-jsonpointer     noarch 1.10-11.el8                     appstream  20 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-jsonschema      noarch 2.6.0-4.el8                     appstream  82 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-jwt             noarch 1.6.1-2.el8                     baseos     43 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-libsemanage     x86_64 2.9-3.el8                       baseos    127 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-markupsafe      x86_64 0.23-19.el8                     appstream  39 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-oauthlib        noarch 2.1.0-1.el8                     baseos    155 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-ply             noarch 3.9-8.el8                       baseos    108 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-policycoreutils noarch 2.9-9.el8                       baseos    2.2 M
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-prettytable     noarch 0.7.2-14.el8                    appstream  44 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-pycparser       noarch 2.14-14.el8                     baseos    109 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-pyserial        noarch 3.1.1-8.el8                     appstream 169 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-pysocks         noarch 1.6.8-3.el8                     baseos     34 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-pytz            noarch 2017.2-9.el8                    appstream  54 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-pyyaml          x86_64 3.12-12.el8                     baseos    193 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-requests        noarch 2.20.0-2.1.el8_1                baseos    123 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-setools         x86_64 4.3.0-2.el8                     baseos    626 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:  python3-urllib3         noarch 1.24.2-4.el8                    baseos    176 k
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Transaction Summary
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: ================================================================================
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Install  28 Packages
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script:
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Total download size: 12 M
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Installed size: 46 M
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Downloading Packages:
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (1/28): python3-jinja2-2.10.1-2.el8_0.noarch.rp 8.7 MB/s | 538 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (2/28): python3-jsonpatch-1.21-2.el8.noarch.rpm 5.4 MB/s |  27 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (3/28): python3-jsonpointer-1.10-11.el8.noarch. 3.8 MB/s |  20 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (4/28): python3-jsonschema-2.6.0-4.el8.noarch.r 7.4 MB/s |  82 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (5/28): cloud-init-19.4-11.el8_3.1.noarch.rpm    10 MB/s | 945 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (6/28): python3-markupsafe-0.23-19.el8.x86_64.r 5.8 MB/s |  39 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (7/28): python3-prettytable-0.7.2-14.el8.noarch 5.4 MB/s |  44 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (8/28): python3-pyserial-3.1.1-8.el8.noarch.rpm  16 MB/s | 169 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (9/28): python3-pytz-2017.2-9.el8.noarch.rpm    7.1 MB/s |  54 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (10/28): python3-babel-2.5.1-5.el8.noarch.rpm    25 MB/s | 4.8 MB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (11/28): checkpolicy-2.9-1.el8.x86_64.rpm       3.9 MB/s | 348 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (12/28): python3-asn1crypto-0.24.0-3.el8.noarch 1.7 MB/s | 181 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (13/28): python3-chardet-3.0.4-7.el8.noarch.rpm 7.7 MB/s | 195 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (14/28): python3-audit-3.0-0.17.20191104git1c2f 1.8 MB/s |  86 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (15/28): python3-cffi-1.11.5-5.el8.x86_64.rpm   4.5 MB/s | 237 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (16/28): python3-idna-2.5-5.el8.noarch.rpm      4.1 MB/s |  97 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (17/28): python3-jwt-1.6.1-2.el8.noarch.rpm     2.5 MB/s |  43 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (18/28): python3-cryptography-2.3-3.el8.x86_64.  18 MB/s | 510 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (19/28): python3-libsemanage-2.9-3.el8.x86_64.r 9.6 MB/s | 127 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (20/28): python3-ply-3.9-8.el8.noarch.rpm       8.1 MB/s | 108 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (21/28): python3-oauthlib-2.1.0-1.el8.noarch.rp 8.5 MB/s | 155 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (22/28): python3-pycparser-2.14-14.el8.noarch.r 8.3 MB/s | 109 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (23/28): python3-pysocks-1.6.8-3.el8.noarch.rpm 2.6 MB/s |  34 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (24/28): python3-pyyaml-3.12-12.el8.x86_64.rpm   14 MB/s | 193 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (25/28): python3-requests-2.20.0-2.1.el8_1.noar 8.7 MB/s | 123 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (26/28): python3-setools-4.3.0-2.el8.x86_64.rpm  33 MB/s | 626 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (27/28): python3-urllib3-1.24.2-4.el8.noarch.rp 9.5 MB/s | 176 kB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: (28/28): python3-policycoreutils-2.9-9.el8.noar  37 MB/s | 2.2 MB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: --------------------------------------------------------------------------------
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Total                                            27 MB/s |  12 MB     00:00
Feb  5 12:24:30 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:30 GCEMetadataScripts: startup-script: Running transaction check
Feb  5 12:24:31 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:31 GCEMetadataScripts: startup-script: Transaction check succeeded.
Feb  5 12:24:31 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:31 GCEMetadataScripts: startup-script: Running transaction test
Feb  5 12:24:32 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:32 GCEMetadataScripts: startup-script: Transaction test succeeded.
Feb  5 12:24:32 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:32 GCEMetadataScripts: startup-script: Running transaction
Feb  5 12:24:32 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:32 GCEMetadataScripts: startup-script:   Preparing        :                                                        1/1
Feb  5 12:24:32 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:32 GCEMetadataScripts: startup-script:   Installing       : python3-idna-2.5-5.el8.noarch                         1/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-setools-4.3.0-2.el8.x86_64                    2/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-pyyaml-3.12-12.el8.x86_64                     3/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-pysocks-1.6.8-3.el8.noarch                    4/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-urllib3-1.24.2-4.el8.noarch                   5/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-ply-3.9-8.el8.noarch                          6/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-pycparser-2.14-14.el8.noarch                  7/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-cffi-1.11.5-5.el8.x86_64                      8/28
Feb  5 12:24:33 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:33 GCEMetadataScripts: startup-script:   Installing       : python3-libsemanage-2.9-3.el8.x86_64                  9/28
...
Feb  5 12:24:37 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:37 GCEMetadataScripts: startup-script:   Installing       : cloud-init-19.4-11.el8_3.1.noarch                    28/28
Feb  5 12:24:37 test123-15 systemd[1]: Reloading.
Feb  5 12:24:38 test123-15 systemd[1]: Reloading.
Feb  5 12:24:38 test123-15 systemd[1]: Reloading.
Feb  5 12:24:39 test123-15 systemd[1]: Reloading.
Feb  5 12:24:39 test123-15 systemd[1]: Reloading.
Feb  5 12:24:39 test123-15 systemd[1]: Started /usr/bin/systemctl start man-db-cache-update.
Feb  5 12:24:39 test123-15 systemd[1]: cgroup compatibility translation between legacy and unified hierarchy settings activated. See cgroup-compat debug messages for details.
Feb  5 12:24:39 test123-15 systemd[1]: Starting man-db-cache-update.service...
Feb  5 12:24:39 test123-15 systemd[1]: Reloading.
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Running scriptlet: cloud-init-19.4-11.el8_3.1.noarch                    28/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : cloud-init-19.4-11.el8_3.1.noarch                     1/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-babel-2.5.1-5.el8.noarch                      2/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-jinja2-2.10.1-2.el8_0.noarch                  3/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-jsonpatch-1.21-2.el8.noarch                   4/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-jsonpointer-1.10-11.el8.noarch                5/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-jsonschema-2.6.0-4.el8.noarch                 6/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-markupsafe-0.23-19.el8.x86_64                 7/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-prettytable-0.7.2-14.el8.noarch               8/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-pyserial-3.1.1-8.el8.noarch                   9/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-pytz-2017.2-9.el8.noarch                     10/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : checkpolicy-2.9-1.el8.x86_64                         11/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-asn1crypto-0.24.0-3.el8.noarch               12/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_   13/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-cffi-1.11.5-5.el8.x86_64                     14/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-chardet-3.0.4-7.el8.noarch                   15/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-cryptography-2.3-3.el8.x86_64                16/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-idna-2.5-5.el8.noarch                        17/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-jwt-1.6.1-2.el8.noarch                       18/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-libsemanage-2.9-3.el8.x86_64                 19/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-oauthlib-2.1.0-1.el8.noarch                  20/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-ply-3.9-8.el8.noarch                         21/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-policycoreutils-2.9-9.el8.noarch             22/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-pycparser-2.14-14.el8.noarch                 23/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-pysocks-1.6.8-3.el8.noarch                   24/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-pyyaml-3.12-12.el8.x86_64                    25/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-requests-2.20.0-2.1.el8_1.noarch             26/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-setools-4.3.0-2.el8.x86_64                   27/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   Verifying        : python3-urllib3-1.24.2-4.el8.noarch                  28/28
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script: Installed:
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   checkpolicy-2.9-1.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   cloud-init-19.4-11.el8_3.1.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-asn1crypto-0.24.0-3.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-babel-2.5.1-5.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-cffi-1.11.5-5.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-chardet-3.0.4-7.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-cryptography-2.3-3.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-idna-2.5-5.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-jinja2-2.10.1-2.el8_0.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-jsonpatch-1.21-2.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-jsonpointer-1.10-11.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-jsonschema-2.6.0-4.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-jwt-1.6.1-2.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-libsemanage-2.9-3.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-markupsafe-0.23-19.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-oauthlib-2.1.0-1.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-ply-3.9-8.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-policycoreutils-2.9-9.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-prettytable-0.7.2-14.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-pycparser-2.14-14.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-pyserial-3.1.1-8.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-pysocks-1.6.8-3.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-pytz-2017.2-9.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-pyyaml-3.12-12.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-requests-2.20.0-2.1.el8_1.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-setools-4.3.0-2.el8.x86_64
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:   python3-urllib3-1.24.2-4.el8.noarch
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script:
Feb  5 12:24:40 test123-15 GCEMetadataScripts[1040]: 2021/02/05 12:24:40 GCEMetadataScripts: startup-script: Complete!
Feb  5 12:24:41 test123-15 systemd[1]: Reloading.
...

如果您仍然发现启动脚本存在任何问题,我建议您提交问题报告Google 公开问题追踪

相关内容