Я пытаюсь использовать cloud-init на centos8 на vsphere. После создания виртуальной машины я вижу много ошибок, как показано ниже. Я не выполнил никаких настроек, кроме добавления ключа s sh, и пользователь был создан по умолчанию. Я пытаюсь использовать cloud-init с vRealize Automation.
*2020-04-11 23:52:19,490 - util.py[WARNING]: Failed accessing user data.
2020-04-11 23:54:18,122 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [117/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fd1e8820dd8>, 'Connection to 169.254.169.254 timed out. (connect timeout=50.0)'))]
2020-04-11 23:54:20,134 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fd1e883c5f8>, 'Connection to 169.254.169.254 timed out. (connect timeout=1.0)'))]
2020-04-11 23:54:21,135 - DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 120 seconds
2020-04-11 23:54:21,149 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [0/120s]: bad status code [404]
2020-04-11 23:54:22,159 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [1/120s]: bad status code [404]
2020-04-11 23:54:23,167 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [2/120s]: bad status code [404]
2020-04-11 23:54:24,177 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [3/120s]: bad status code [404]
2020-04-11 23:54:25,186 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [4/120s]: bad status code [404]
2020-04-11 23:54:26,195 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [5/120s]: bad status code [404]
2020-04-11 23:54:28,206 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [7/120s]: bad status code [404]
2020-04-11 23:54:30,216 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [9/120s]: bad status code [404]
2020-04-11 23:54:32,228 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [11/120s]: bad status code [404]
2020-04-11 23:54:34,240 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [13/120s]: bad status code [404]
2020-04-11 23:54:36,250 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [15/120s]: bad status code [404]
2020-04-11 23:54:39,261 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [18/120s]: bad status code [404]
2020-04-11 23:54:42,270 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [21/120s]: bad status code [404]
2020-04-11 23:54:51,329 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [30/120s]: bad status code [404]
2020-04-11 23:54:54,341 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [33/120s]: bad status code [404]
2020-04-11 23:54:57,352 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [36/120s]: bad status code [404]
2020-04-11 23:55:01,363 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [40/120s]: bad status code [404]
2020-04-11 23:55:05,374 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [44/120s]: bad status code [404]
2020-04-11 23:55:09,383 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [48/120s]: bad status code [404]
2020-04-11 23:55:13,392 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [52/120s]: bad status code [404]
2020-04-11 23:55:17,402 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [56/120s]: bad status code [404]
2020-04-11 23:55:22,410 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [61/120s]: bad status code [404]
2020-04-11 23:55:27,420 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [66/120s]: bad status code [404]
2020-04-11 23:55:32,431 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [71/120s]: bad status code [404]
2020-04-11 23:55:37,445 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [76/120s]: bad status code [404]
2020-04-11 23:55:42,457 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [81/120s]: bad status code [404]
2020-04-11 23:55:48,469 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [87/120s]: bad status code [404]
2020-04-11 23:55:54,481 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [93/120s]: bad status code [404]
2020-04-11 23:56:00,495 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [99/120s]: bad status code [404]
2020-04-11 23:56:06,508 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [105/120s]: bad status code [404]
2020-04-11 23:56:12,518 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [111/120s]: bad status code [404]
2020-04-11 23:56:19,532 - url_helper.py[WARNING]: Calling 'http://192.168.30.1/latest/meta-data/instance-id' failed [118/120s]: bad status code [404]
2020-04-11 23:56:26,537 - DataSourceCloudStack.py[CRITICAL]: Giving up on waiting for the metadata from ['http://192.168.30.1/latest/meta-data/instance-id'] after 125 seconds
Cloud-init v. 18.5 running 'modules:config' at Sat, 11 Apr 2020 23:56:28 +0000. Up 283.64 seconds.
Cloud-init v. 18.5 running 'modules:final' at Sat, 11 Apr 2020 23:56:28 +0000. Up 284.34 seconds.
Cloud-init v. 18.5 finished at Sat, 11 Apr 2020 23:56:28 +0000. Datasource DataSourceNone. Up 284.45 seconds
2020-04-11 23:56:28,909 - cc_final_message.py[WARNING]: Used fallback datasource
Cloud-init v. 18.5 running 'init-local' at Sun, 12 Apr 2020 00:05:45 +0000. Up 11.78 seconds.
Cloud-init v. 18.5 running 'init' at Sun, 12 Apr 2020 00:05:48 +0000. Up 15.09 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++++
ci-info: +------------+-------+----------------------------+---------------+--------+-------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: +------------+-------+----------------------------+---------------+--------+-------------------+
ci-info: | ens34 | True | 192.168.30.10 | 255.255.255.0 | global | 00:50:56:8b:07:ca |
ci-info: | ens34 | True | fe80::250:56ff:fe8b:7ca/64 | . | link | 00:50:56:8b:07:ca |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: | virbr0 | False | . | . | . | 52:54:00:d0:05:e7 |
ci-info: | virbr0-nic | True | fe80::5054:ff:fed0:5e7/64 | . | link | 52:54:00:d0:05:e7 |
ci-info: +------------+-------+----------------------------+---------------+--------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
ci-info: +-------+--------------+--------------+---------------+-----------+-------+
ci-info: | Route | Destination | Gateway | Genmask | Interface | Flags |
ci-info: +-------+--------------+--------------+---------------+-----------+-------+
ci-info: | 0 | 0.0.0.0 | 192.168.30.1 | 0.0.0.0 | ens34 | UG |
ci-info: | 1 | 192.168.30.0 | 0.0.0.0 | 255.255.255.0 | ens34 | U |
ci-info: +-------+--------------+--------------+---------------+-----------+-------+
ci-info: +++++++++++++++++++Route IPv6 info++++++++++++++++++++
ci-info: +-------+-------------+---------+------------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+------------+-------+
ci-info: | 1 | fe80::/64 | :: | ens34 | U |
ci-info: | 2 | fe80::/64 | :: | virbr0-nic | U |
ci-info: | 4 | ff00::/8 | :: | ens34 | U |
ci-info: | 5 | ff00::/8 | :: | virbr0-nic | U |
ci-info: +-------+-------------+---------+------------+-------+
Cloud-init v. 18.5 running 'modules:config' at Sun, 12 Apr 2020 00:05:49 +0000. Up 16.19 seconds.
Cloud-init v. 18.5 running 'modules:final' at Sun, 12 Apr 2020 00:05:50 +0000. Up 17.25 seconds.
ci-info: no authorized ssh keys fingerprints found for user cloud-user.
Cloud-init v. 18.5 finished at Sun, 12 Apr 2020 00:05:50 +0000. Datasource DataSourceOVF [seed=vmware-tools]. Up 17.44 seconds*
192.168.30.1 - это шлюз по умолчанию, и я не знаю, откуда он получает 169.254.169.254. Я могу пинговать гугл с ВМ. Конфигурационный файл выглядит следующим образом
system_info:
default_user:
name: cloud-user
lock_passwd: true
gecos: Cloud User
groups: [wheel, adm, systemd-journal]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDfSMu+lvhBex75jsMHa+2pkN2eVPz4EVrzVyeBOoOo8dmm7Gmi3bSsu5LeOhytcSohd20FgOzaPQb4gZI7kyEul9jK6ZR4kgMe+k9xMJzdsucMgduhbtl8gFfGWBG7nFy8oT7YDItDzPeupgSk8Zr7GktqPHE9DYps+R41h+fBCCyi+eNtlHEFEi9iE28/rUkv2LoHTJPtyh1C7FSzx7U0gGJJBBlfWbC2vYn0nBgqixff9EFyj0ZfndwYoZKVNGy4n/ELFCrX08HVxbJDmenpz0a4qf4tD6nh7D/4vmu4AL0YyCdNsIRc/97SdG763zMwinvtmWyXJwL12txXsCVMgmsaudBeF4YZ0JpOsJnBk7cKPNjiHMq8K3NnIaiFLGVKwHIMR3/21dLlCL30O7sgCdB9o3Gxpn7mP55RZpHl9ndTy0J51pmWm+fAehziiV62813ipfEnZgBLy/5vzBn2ADmLvGR+T6OHZlvJROBrx73RHy55HJIRz836XkSLaJk= cloud-user@localhost
distro: rhel
paths:
cloud_dir: /var/lib/cloud
templates_dir: /etc/cloud/templates
ssh_svcname: sshd
TIA