BOSH openstack stemcells are QCOW2 format by default. If you need RAW stemcell version. Use the following script.
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo 'Usage: raw_convert.sh <tgz stemcell>'
exit 0
fi
original_dir=$(pwd)
tmpdir=$(mktemp -d -t stemcell)
cp $1 $tmpdir/
pushd $tmpdir
tar zxvf $1
rm $1
tar zxvf image
qemu-img convert -O raw root.img root.raw
mv root.raw root.img
rm image
tar czvf image root.img
rm root.img
sha1=$(openssl sha1 image| awk '{print $NF}')
sed -i.bak "s/^sha1: .*$/sha1: $sha1/" stemcell.MF
sed -i.bak "s/^ disk_format: .*$/ disk_format: raw/" stemcell.MF
rm stemcell.MF.bak
tar czvf $original_dir/bosh-stemcell-raw.tgz *
popd
Usage: ./raw_convert.sh bosh-stemcell-2605-openstack-kvm-ubuntu-lucid.tgz
To use RAW stemcell in microbosh/bosh boot from volume must be set.
Example:
cloud:
plugin: openstack
properties:
openstack:
auth_url: http://10.1.0.1:5000/v2.0
username: *****
api_key: *****
tenant: *****
default_security_groups: ["ssh", "bosh"]
default_key_name: microbosh
private_key: /home/fedora/.ssh/microbosh
boot_from_volume: true