Add support for vmdk files as glance images
* Adds support for vmdk files as glance images in upload_image function * Set default image url to use for vsphere driver in stackrc * Now using a more stable url Change-Id: If6d45bc8dfd3c812ded5e1bcf69ad7ebd9b64f34
This commit is contained in:
@@ -1219,6 +1219,14 @@ function upload_image() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# vmdk format images
|
||||||
|
if [[ "$image_url" =~ '.vmdk' ]]; then
|
||||||
|
IMAGE="$FILES/${IMAGE_FNAME}"
|
||||||
|
IMAGE_NAME="${IMAGE_FNAME%.vmdk}"
|
||||||
|
glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public=True --container-format bare --disk-format vmdk --property vmware-disktype="preallocated" < "${IMAGE}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# XenServer-ovf-format images are provided as .vhd.tgz as well
|
# XenServer-ovf-format images are provided as .vhd.tgz as well
|
||||||
# and should not be decompressed prior to loading
|
# and should not be decompressed prior to loading
|
||||||
if [[ "$image_url" =~ '.vhd.tgz' ]]; then
|
if [[ "$image_url" =~ '.vhd.tgz' ]]; then
|
||||||
|
3
stackrc
3
stackrc
@@ -240,7 +240,8 @@ case "$VIRT_DRIVER" in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
vsphere)
|
vsphere)
|
||||||
IMAGE_URLS="";;
|
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-debian-2.6.32-i686}
|
||||||
|
IMAGE_URLS=${IMAGE_URLS:-"http://partnerweb.vmware.com/programs/vmdkimage/debian-2.6.32-i686.vmdk"};;
|
||||||
*) # Default to Cirros with kernel, ramdisk and disk image
|
*) # Default to Cirros with kernel, ramdisk and disk image
|
||||||
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec}
|
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec}
|
||||||
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
|
IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
|
||||||
|
Reference in New Issue
Block a user