How to prepare an Ubuntu 12.04 LTS Image with Cloud-init

Cloud-init has emerged to the be de-facto multi-distribution package that handles early initialization of a cloud instance. For more information on cloud-init, refer here:

This tutorial describes how to prepare a Ubuntu 12.04 LTS image using cloud-init.


The version of cloud-init specific to Ubuntu 12.04 LTS has several unresolved bugs currently, including the following:

  • The static IP allocation through cloud-init fails because the cloud-init process is unable to parse the cloud metadata supplied by OpenStack.
  • There are issues with network re-initialization that cause problems with networking configuration.

In this tutorial, we offer a patch specific to the cloud-init version corresponding to 12.04 which addresses these issues.

Step 1 – Get the Prerequisites

Download Ubuntu 12.04 cloud image for your configuration. We recommend using 12.04.4.

NOTE: DO NOT use Ubuntu 12.04.5. Ubuntu 12.04.5 has a missing dependency which causes cloud-init install to fail. If you wish to use 12.04.5, we recommend getting the 12.04.4 version first and then updating it to 12.04.5. Fresh ISO install of 12.04.5 will not work with cloud-init.

Download the attached patch and deb file for Ubuntu 12.04 cloud-init package 0.6.3_1.15.

Step 2 – Prepare Ubuntu 12.04 Image with Cloud-init

Boot the Ubuntu cloud image. (You might want to look at this gist:

Copy the attached deb file that we previously download into the instance.

Uninstall existing version of cloud-init, and install the new package just copied.

# remove existing cloud-init
apt-get remove cloud-init

#install the new cloud-init
dpkg -i cloud-init_0.6.3-0ubuntu1.15_all.deb

Optional – Download Prebuilt Images

Download prebuilt images with cloudinit here:

NOTE: Be careful with future updates to Ubuntu 12.04 which may bring in new version of cloud-init creating similar issue. You will need to repeat the above process again in that case.

Vamsi Chemitiganti
Chief Strategist at Platform9 Systems. Vamsi works with Platform9's Client CXOs and Architects to help them on key business transformation initiatives. In previous roles, Vamsi was the CTO for RiskCounts - a FinTech based in NYC. Prior to that spent eight years as the Chief Architect for Red Hat’s Global Financial Services Vertical based out of NYC. Vamsi also spent two years as the General Manager (Financial Services) at Hortonworks. In both roles, Vamsi was responsible for driving Red Hat and Hortonworks technology vision from a client business standpoint. The clients Vamsi engages with on a daily basis span marquee financial services names across major banking centers in Wall Street, Toronto, London & in Asia. These include businesses in capital markets, retail banking, wealth management and IT operations. holds a BS in Computer Science and Engineering as well as an MBA from the University of Maryland, College Park. He is also a regular speaker at industry events on topics ranging from Cloud Computing, Big Data, AI, High-Performance Computing and Enterprise Middleware. In 2013, Wall Street and Technology Magazine identified Vamsi as a Global Thought Leader. Vamsi writes weekly on financial services business and technology landscape at his highly influential blog –

The browser you are using is outdated. For the best experience please download or update your browser to one of the following: