【问题标题】:How do I execute a script with Cloudinit, using the nocloud data source如何使用 nocloud 数据源使用 Cloudinit 执行脚本
【发布时间】:2020-09-21 18:55:04
【问题描述】:

我正在尝试使用 cloudinit 自动配置 linux 机器 (rhel8)。

为此,我创建了一个包含以下内容的 ISO:

[root@]# tree rhel82test1/
rhel82test1/
├── meta-data
├── network-config
├── scripts
│   └── per-instance
│       └── demo.sh
└── user-data

2 directories, 4 files

此 iso 在 vi​​rt-install 期间添加到 VM。

用户数据、元数据和网络配置按预期应用。但是我希望 demo.sh 脚本也能被执行。我在日志中看到 config-scripts-per-instance 运行,但脚本未执行。它也不存在于 /var/lib/cloud/instance/scripts 中

我在这里做错了什么。这不是执行脚本的正确方法吗?

【问题讨论】:

    标签: cloud-init rhel8


    【解决方案1】:

    参见source,未针对 NoCloud 实施

    【讨论】:

      猜你喜欢
      • 2014-07-15
      • 2017-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-12
      • 2012-03-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多