Merge "xenapi: devstack support for raw tgz image upload"
This commit is contained in:
commit
bc11e0a0bc
18
functions
18
functions
@ -1260,7 +1260,7 @@ function upload_image() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# XenServer-ovf-format images are provided as .vhd.tgz as well
|
# XenServer-vhd-ovf-format images are provided as .vhd.tgz
|
||||||
# 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
|
||||||
IMAGE="$FILES/${IMAGE_FNAME}"
|
IMAGE="$FILES/${IMAGE_FNAME}"
|
||||||
@ -1269,6 +1269,22 @@ function upload_image() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# .xen-raw.tgz suggests a Xen capable raw image inside a tgz.
|
||||||
|
# and should not be decompressed prior to loading.
|
||||||
|
# Setting metadata, so PV mode is used.
|
||||||
|
if [[ "$image_url" =~ '.xen-raw.tgz' ]]; then
|
||||||
|
IMAGE="$FILES/${IMAGE_FNAME}"
|
||||||
|
IMAGE_NAME="${IMAGE_FNAME%.xen-raw.tgz}"
|
||||||
|
glance \
|
||||||
|
--os-auth-token $token \
|
||||||
|
--os-image-url http://$GLANCE_HOSTPORT \
|
||||||
|
image-create \
|
||||||
|
--name "$IMAGE_NAME" --is-public=True \
|
||||||
|
--container-format=tgz --disk-format=raw \
|
||||||
|
--property vm_mode=xen < "${IMAGE}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
KERNEL=""
|
KERNEL=""
|
||||||
RAMDISK=""
|
RAMDISK=""
|
||||||
DISK_FORMAT=""
|
DISK_FORMAT=""
|
||||||
|
@ -108,6 +108,10 @@ function configure_glance() {
|
|||||||
fi
|
fi
|
||||||
iniset_rpc_backend glance $GLANCE_API_CONF DEFAULT
|
iniset_rpc_backend glance $GLANCE_API_CONF DEFAULT
|
||||||
iniset $GLANCE_API_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/api
|
iniset $GLANCE_API_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/api
|
||||||
|
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
||||||
|
iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
|
||||||
|
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
|
||||||
|
fi
|
||||||
|
|
||||||
# Store the images in swift if enabled.
|
# Store the images in swift if enabled.
|
||||||
if is_service_enabled s-proxy; then
|
if is_service_enabled s-proxy; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user