Create new Linux instances from the same cloud image.
Read metadata and user-data to set a unique hostname, users, SSH keys, and network settings at first boot.
Which mechanism is commonly used?
cloud-init reads a cloud data source and applies metadata and user-data, especially during first boot, to configure users, keys, networking, and packages.
Detailed explanation
rpm2cpioIncorrect. rpm2cpio extracts RPM contents and does not configure a cloud instance.
Incorrect. rpm2cpio extracts RPM contents and does not configure a cloud instance.
cloud-initCorrect. cloud-init performs instance-specific first-boot configuration from metadata and user-data.
Correct. cloud-init performs instance-specific first-boot configuration from metadata and user-data.
ldconfigIncorrect. ldconfig manages shared-library links and cache.
Incorrect. ldconfig manages shared-library links and cache.
grub-installIncorrect. grub-install installs a bootloader.
Incorrect. grub-install installs a bootloader.
Try it yourself
An example you can run in a temporary verification environment.
cloud-init status --longExpected result
導入済み環境ではcloud-initの状態とデータソース情報。設定の再実行は行わないKey points
- It detects a data source
- It processes user-data
- Execution frequency matters
Notes
- Environment: cloud-init 25.x公式仕様
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.