Making Debian stable/jessie images for OpenStack with bootstrap-vz and cloud-init

I’m investigating the creation of VM images for different virtualisation solutions.

Among the target platforms is a destop as a service platform based on an OpenStack public cloud.

We’ve been working with bootstrap-vz for creating VMs for Vagrant+VirtualBox so I wanted to test its use for OpenStack.

There are already pre-made images available, including official Debian ones, but I like to be able to re-create things instead of depending on some external magic (which also means to be able to optimize, customize and avoid potential MitM, of course).

It appears that bootstrap-vz can be used with cloud-init provided that some bits of config are specified.

In particular the cloud_init plugin of bootstrap-vz requires a metadata_source set to “NoCloud, ConfigDrive, OpenStack, Ec2“. Note we explicitely spell it ‘OpenStack‘ and not ‘Openstack‘ as was mistakenly done in the default Debian cloud images (see

The following snippet of manifest provides the necessary bits :

name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
  name: kvm
  - virtio_pci
  - virtio_blk
  workspace: /target
  # create or reuse a tarball of packages
  tarball: true
  release: jessie
  architecture: amd64
  bootloader: grub
  charmap: UTF-8
  locale: en_US
  timezone: UTC
  backing: raw
    #type: gpt
    type: msdos
      filesystem: ext4
      size: 4GiB
      size: 512MiB
  # change if another mirror is closer
    password: whatever
    username: debian
    # Note we explicitely spell it 'OpenStack' and not 'Openstack' as done in the default Debian cloud images (see
    metadata_sources: NoCloud, ConfigDrive, OpenStack, Ec2
  # admin_user:
  #   username: Administrator
  #   password: Whatever
    # reduce the size by around 250 Mb
    zerofree: true

I’ve tested this with the bootstrap-vz version in stretch/testing (0.9.10+20170110git-1) for creating jessie/stable image, which were booted on the OVH OpenStack public cloud. YMMV.

Hope this helps

Conférence “L’économie du logiciel libre et la percée d’OpenStack dans le cloud” le 27/03 à Évry

L’association Minet organise une conférence le 27/03 dans les locaux de Télécom SudParis et Télécom École de Management à Évry, qui promet d’être intéressante.

Elle portera à la fois sur l’économie du logiciel libre et sur l’essort d’OpenStack dans le cloud.

N’hésitez pas à venir nombreux sur le campus pour écouter les interventions de Jonathan Le Lous, Julien Brichard et Raphaël Ferreira, et rencontrer votre serviteur 😉

Plus de détails sur le site de Minet.