Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Where does output from cloud-init (automatically runs scripts when starting up a virtual machine in the cloud, for example at Amazon EC2) go? I would like to know that my initialization scripts executed successfully.

There is a /var/log/cloud-init.log file, but it seems to contain only partial output (namely from the SSH key initialization).

share|improve this question
up vote 6 down vote accepted

It doesn't log anywhere by default, though it will appear in the console log if your cloud provider supports it.

Also, you can capture all subprocess output by explicitly requesting that happen. This example at the bottom of Ubuntu's cloud-config-chef example shows how:

# Capture all subprocess output into a logfile
# Useful for troubleshooting cloud-init issues
output: {all: '| tee -a /var/log/cloud-init-output.log'}
share|improve this answer

I couldn't find way a "native" way for doing that. Before passing the script to cloud-init, I've simply (automatically) appended a >> /tmp/init-script-log 2>&1 to each line of the script, to forward stout and stderr to a file.

share|improve this answer

On my EC2 box (running the Amazon Linux AMI) it's stored in /var/log/cloud-init.log

share|improve this answer
Thanks, but it doesn't seem to contain output from user scripts. – Valko Sipuli Feb 19 '11 at 7:24

On the Centos 7 AMI I am using, the output of my user data script is in /var/log/cloud-init-output.log.

share|improve this answer

First of all let me congratulate you on using cloud-init, it's a quite amazing tool!

There's no way yet to setup a log level but by default cloud-init will run with DEBUG enabled.

It's still in heavy development, I expect it to be a lot better by the release of Ubuntu Natty

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.