When you need a stemcell for a release, you go to the https://www.bosh.io/stemcells page. While it's clear which Operating System to choose from (Ubuntu or Cent OS) the next few decisions to make can become less clear as you sort through each of the additional options.

In this article, we'll help you understand what all the terms mean, so you can make an educated decision for your targeted infrastructure.

A Plethora of Choices

At minimum building a Stemcell combines an Infrastructure-as-a-Service (Iaas) and an Operating System (OS) with a Cloud Provider Interface (CPI).

For example on Azure it's simply, Azure Hyper-V Ubuntu, (or CentOS), etc.

But what about the other choices out there? What's the difference between a Light and a non-Light? Does the Light stemcell just work out more?

Let's dig a bit deeper to find out.

IaaS CPI Ubuntu CentOS
AWS Xen, Xen Light, Xen HVM Light Yes Yes
Azure Hyper-V Yes Yes
OpenStack KVM, KVM (raw) Yes Yes
SoftLayer ESXi Light Yes No
vCenter ESXi Yes No
vSphere ESXi Yes Yes
BOSH Lite Warden Yes No

When we look at the options like this we can see some variations in the CPI versions emerge. Here's a list of which ones we'll discuss further.

  • Light
  • HVM
  • Raw

Light Stemcells

Light Stemcells work with the targeted infrastructure's system to allow them to host the image. We can then reference the stemcell for import at runtime.

Download a light stemcell, and open the contents. In the stemcell.MF we can see the metadata for the cloud_properties. By using the CPI and this metadata, BOSH will be able to obtain the image remotely from the IaaS.

Describes any IaaS-specific properties needed to import OS image.

Check out this example from the AWS Xen Light stemcell:

    eu-west-1: ami-8b6c05f8
    us-west-2: ami-d7549db7
    eu-central-1: ami-136c9b7c
    ap-northeast-1: ami-3a95535b
    ap-northeast-2: ami-3622e858
    us-west-1: ami-b5e3a3d5
    sa-east-1: ami-fa148396
    ap-southeast-1: ami-e1ce1082
    ap-southeast-2: ami-9d6652fe
    us-east-1: ami-3c2fbc2b

Hardware-assisted virtualization (HVM) Stemcells

AWS EC2 uses Xen to virtualize machine instances. Two of the most common Guest Types used are:

  • Paravirtualization (PV)
  • Hardware-assisted virtualization (HVM)

Previous generation instances of EC2 were typically Paravirtualized servers, which would be the "AWS Xen Light" choice.

The Amazon Linux AMI Instance Type Matrix is a useful guide to help you determine if the instance size you're about to use is compatible with the "AWS Xen HVM Light" choice of stemcell.

Raw Stemcells

When the target infrastructure is OpenStack ask yourself if you'll be using Cinder block storage.

If so, you'd want to use the raw uncompressed stemcell option "OpenStack KVM (raw)". Then configure the root_disk property to include the boot_from_volume: true to enable cinder-backed boot volumes.

Choose Wisely

We hope this has helped to give you some insights into which stemcells are the right tool for the job. Let us know if you have any questions we may have missed when talking about variations of stemcells.