如何为instace(Linux)注入文件,它处于Running状态

时间:2016-08-16 15:07:09

标签: cloud openstack openstack-nova openstack-heat

在Openstack中,我启动了图像和afetr启动图像我想为该实例注入一个文件。在openstack中有可能吗?如果是,那么如何?

1 个答案:

答案 0 :(得分:0)

是的,可以使用cloud init。

Cloud init已经为您注入了一些文件,例如它管理ssh配置,以便您可以在启动后使用密钥对登录。

写出任意文件一节中查看此示例: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#yaml-examples

您必须根据此示例创建yaml文件,并在openstack中启动实例时将其添加到用户数据