To view the Cloudbase-Init execution log, you can check the log files generated by Cloudbase-Init during its initialization process. The logs provide detailed information about the steps executed, errors encountered, and other relevant events.
Default Log Location:
C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\cloudbase-init.log
/var/log/cloudbase-init.log
Check Log Content:
notepad on Windows or cat/less on Linux).Enable Debug Logging (Optional):
cloudbase-init.conf).debug parameter to True and restart the Cloudbase-Init service.On a Windows instance, you might see entries like:
2024-01-01 12:00:00,000 - cloudbaseinit - INFO - Executing plugin: SetUserSSHPublicKeys
2024-01-01 12:00:01,000 - cloudbaseinit - ERROR - Failed to set SSH keys: Permission denied
On a Linux instance, the log might show:
2024-01-01 12:00:00,000 - cloudbaseinit - INFO - Running plugin: set_hostname
2024-01-01 12:00:01,000 - cloudbaseinit - WARNING - Metadata service timeout
If you're using Tencent Cloud, you can also check instance system logs in the Tencent Cloud Console under Cloud Virtual Machine (CVM) > Instance Details > Log > System Log. For more advanced logging and monitoring, consider using Tencent Cloud Cloud Log Service (CLS) to centralize and analyze Cloudbase-Init logs.