Merge "XenAPI: Cirros images must always boot as PV."
This commit is contained in:
commit
e93a9cf79a
16
functions
16
functions
@ -199,7 +199,21 @@ function upload_image {
|
|||||||
# 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_NAME="${IMAGE_FNAME%.vhd.tgz}"
|
IMAGE_NAME="${IMAGE_FNAME%.vhd.tgz}"
|
||||||
glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "$IMAGE_NAME" --is-public=True --container-format=ovf --disk-format=vhd < "${IMAGE}"
|
FORCE_VM_MODE=""
|
||||||
|
if [[ "$IMAGE_NAME" =~ 'cirros' ]]; then
|
||||||
|
# Cirros VHD image currently only boots in PV mode.
|
||||||
|
# Nova defaults to PV for all VHD images, but
|
||||||
|
# the glance setting is needed for booting
|
||||||
|
# directly from volume.
|
||||||
|
FORCE_VM_MODE="--property vm_mode=xen"
|
||||||
|
fi
|
||||||
|
glance \
|
||||||
|
--os-auth-token $token \
|
||||||
|
--os-image-url http://$GLANCE_HOSTPORT \
|
||||||
|
image-create \
|
||||||
|
--name "$IMAGE_NAME" --is-public=True \
|
||||||
|
--container-format=ovf --disk-format=vhd \
|
||||||
|
$FORCE_VM_MODE < "${IMAGE}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user