How to use CloudInit in CloudForms or ManageIQ

Posted by cjung on Wed, Jan 28, 2015

CloudForms/ManageIQ and RHEV both support CloudInit.

In CloudForms the configuration is hidden in Infrastructure, PXE. Navigate to “Customization Templates” on the left hand accordion and create a new template (I used the folder “RHEL-6” for my testing). When creating the temlate select “CloudInit” in the “Type” drop down list.

Now you can add your raw CloudInit configuration into the text area.

Note: Your script has to start with this first line: #cloud-config

Otherwise you’ll get a parsing error during boot of your new VMs or instances.

A complete example could looke like this:

#cloud-config
users:
- default
- name: foobar2
  gecos: Foo B. Bar
  groups: users
  plain_text_passwd: 'foobar'
- name: root
  chpasswd:
  list: |
  root:password
  expire: False
# end of example