有没有办法让 cloud-init 从硬盘本身获取数据源?

Is there any way to make cloud-init get the datasource from the hard disk itself?

我在我们的产品中实现了 cloud-init 功能。我被指派在不使用 cd-rom 的情况下实现这一点(实际上仅来自硬盘本身)。那有什么办法吗?

当然可以。您可以在 cloud-init 源中使用 NoCloud Datasource, which will look in /var/lib/cloud/seed without special configuration. See the seed example