Updated on 2022-02-22 GMT+08:00

Cloud-Init

What Is Cloud-Init?

Cloud-Init is an open-source cloud initialization program, which initializes specific configurations, such as the host name, key, and user data, of a newly created BMS.

All public images support Cloud-Init.

Impact on IMS

To ensure that BMSs you create using private images support customized configurations, you must install Cloud-Init or Cloudbase-Init when you create private images.

  • For Windows OSs, download and install Cloudbase-Init.
  • For Linux OSs, download and install Cloud-Init.

After Cloud-Init or Cloudbase-Init is installed in an image, Cloud-Init or Cloudbase-Init automatically initializes the BMS when you create it. For details about how to install Cloud-Init and Cloudbase-Init, see Bare Metal Server Private Image Creation Guide.

Impact on BMS

  • When you create a BMS, if the image you select supports Cloud-Init, you can use user data injection to inject customized configuration, such as the BMS login password, into the BMS. For details, see Injecting User Data into BMSs.
  • If Cloud-Init is installed, you can view BMS metadata and configure and manage running BMSs. For more information, see Metadata.

Notes

  • If Cloud-Init has been installed, enable DHCP in the VPC to which the BMS belongs.
  • If Cloud-Init has been installed, ensure that security group rules in the outbound direction meet the following requirements so that you can access the metadata service:
    • Protocol: TCP
    • Port Range: 80
    • Remote End: 169.254.0.0/16

    If you use the default security group rule in the outbound direction, the preceding requirements are met, and the metadata service can be accessed. The default outbound security group rule is as follows:

    • Protocol: ANY
    • Port Range: ANY
    • Remote End: 0.0.0.0/16