<commit_before>---
title: Using Light Stemcells
---

<p class="note">Note: This feature is available with bosh-openstack-cpi v28+.</p>

You can create your own OpenStack light stemcells to re-use stemcell images already uploaded to your OpenStack image store. **Note:** Future deployments will fail if the stemcell image referenced by a light stemcell is removed from your OpenStack image store.

1. Retrieve the UUID of an already uploaded stemcell image e.g. with `openstack image list`
1. Retrieve the operating system and version of the stemcell from the image metadata to  e.g. with `openstack image show <image UUID>`
1. Use the [`create_light_stemcell`](https://github.com/cloudfoundry-incubator/bosh-openstack-cpi-release/blob/master/scripts/create_light_stemcell)  script to create a light stemcell archive

    ```
    $ ./create_light_stemcell --os ubuntu-trusty --version 3312 --image-id 1234-567-890
    ```

You can use the light stemcell archive like a regular stemcell archive in BOSH deployment manifests and with `bosh create-env` command.

---
[Back to Table of Contents](index.html#cpi-config)

Previous: [Multi-homed VMs](openstack-multiple-networks.html)<commit_msg>Adapt notes to create light stemcells in OpenStack<commit_after>---
title: Using Light Stemcells
---

<p class="note">Note: This feature is available with bosh-openstack-cpi v28+.</p>
<p class="note">Note: This feature is available with bosh-cli v2.0.40+.</p>

You can create your own OpenStack light stemcells to re-use stemcell images already uploaded to your OpenStack image store. **Note:** Future deployments will fail if the stemcell image referenced by a light stemcell is removed from your OpenStack image store.

1. Download the heavy stemcell for which you want to create a light stemcell
1. Upload the stemcell to your OpenStack with `bosh upload-stemcell`
1. Retrieve the UUID and version of the uploaded stemcell image with `bosh stemcells`
1. Use `bosh repack-stemcell` to create a light stemcell archive from a heavy stemcell

    ```
    $ STEMCELL_VERSION=<Stemcell version> bosh repack-stemcell --version "${STEMCELL_VERSION}" \
   --empty-image \
   --format openstack-light \
   --cloud-properties="{\"image_id\": \"<Stemcell UUID>\"}" \
   heavy-stemcell.tgz ./light-bosh-stemcell-${STEMCELL_VERSION}-openstack-kvm-ubuntu-trusty-go_agent.tgz
    ```

You can use the light stemcell archive like a regular stemcell archive in BOSH deployment manifests and with `bosh create-env` command.

---
[Back to Table of Contents](index.html#cpi-config)

Previous: [Multi-homed VMs](openstack-multiple-networks.html)
{'fraction_non_alphanumeric': 0.09525631216526396, 'fraction_numerical': 0.011094108645753635, 'mean_word_length': 4.315040650406504, 'pattern_counts': {'":': 1, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6703545', 'n_tokens_mistral': 811, 'n_tokens_neox': 761, 'n_words': 302}