提供的云配置无效,Ubuntu 22.04

提供的云配置无效,Ubuntu 22.04

你好!我正在尝试为 openstack 准备一个图像。但我收到错误。cloud-init-output.log:

2022-08-08 20:01:34,225 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.
Cloud-init v. 22.2-0ubuntu1~22.04.3 running 'modules:config' at Mon, 08 Aug 2022 20:01:36 +0000. Up 12.47 seconds.
Cloud-init v. 22.2-0ubuntu1~22.04.3 running 'modules:final' at Mon, 08 Aug 2022 20:01:36 +0000. Up 13.04 seconds.
Cloud-init v. 22.2-0ubuntu1~22.04.3 finished at Mon, 08 Aug 2022 20:01:36 +0000. Datasource DataSourceNone.  Up 13.27 seconds
2022-08-08 20:01:37,016 - cc_final_message.py[WARNING]: Used fallback datasource

sudo cloud-init 模式 --system

Error:
Cloud config schema errors: users.0: {'gecos': 'cadm', 'groups': {'plugdev', 'sudo', 'lxd', 'adm', 'dip', 'cdrom'}, 'lock_passwd': False, 'name': 'cadm', 'passwd': '$6$QJhQO5wtDW8P7hgm$5xsTlX9WZsY8ksqYbWmltQP3boAprZFQUb2wBqNWPAH9XyPcuDGa8dtjORG7O7enQ2pwWHuhcag0SwedvstvV0', 'shell': '/bin/bash'} is not valid under any of the given schemas

systemctl 状态云初始化:

● cloud-init.service - Initial cloud-init job (metadata service crawler)
     Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2022-08-08 20:01:34 UTC; 15min ago
   Main PID: 593 (code=exited, status=0/SUCCESS)
        CPU: 761ms

Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: +-------+-------------+---------+-----------+-------+
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: | Route | Destination | Gateway | Interface | Flags |
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: +-------+-------------+---------+-----------+-------+
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: |   1   |  fe80::/64  |    ::   |   enp1s0  |   U   |
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: |   3   |    local    |    ::   |   enp1s0  |   U   |
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: |   4   |  multicast  |    ::   |   enp1s0  |   U   |
Aug 08 20:01:34 ubuntu cloud-init[597]: ci-info: +-------+-------------+---------+-----------+-------+
Aug 08 20:01:34 ubuntu cloud-init[597]: 2022-08-08 20:01:34,225 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.
Aug 08 20:01:34 ubuntu systemd[1]: Finished Initial cloud-init job (metadata service crawler).

我在 Ubuntu 22.04 镜像中使用常规 cloud-init,我对以下几行做了一些小的更改:

# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the default $user
disable_root: false
ssh_pwauth: true

   # Default user name + that default users groups (if added/used)
   default_user:
     name: cadm
     lock_passwd: False

在开放堆栈上安装映像后,网络接口不工作(关闭),ssx 服务因错误而崩溃,未创建用户,主机名未更改,还有许多其他问题...请告诉我如何解决这个问题?谢谢大家,祝您有美好的一天!

相关内容