How to re-run cloud-init without reboot

后端 未结 4 1592
南方客
南方客 2021-01-30 22:52

I am using openstack to create a VM using \'nova boot\' command. My image is cloud-init enabled. I pass a --user-data script which is a bash shell format for cloud-init to run d

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 23:23

    The commands have been updated so to re-run you need to clean out the existing config:

    sudo cloud-init clean
    

    Then re-run it using the init directive:

    sudo cloud-init init
    

    Beware: things like ssh host keys maybe regenerated.

提交回复
热议问题