copr-hypervisor: upload-qcow2-images: upload to OSUOSL as RAW
This commit is contained in:
parent
ab961cc73a
commit
55e2d07b72
1 changed files with 14 additions and 1 deletions
|
@ -35,7 +35,20 @@ case $(uname -m) in
|
||||||
ppc64le)
|
ppc64le)
|
||||||
# We are going to upload the same image to OpenStack
|
# We are going to upload the same image to OpenStack
|
||||||
. "{{ provision_directory }}/.rc-osuosl.sh"
|
. "{{ provision_directory }}/.rc-osuosl.sh"
|
||||||
glance image-create --name "$new_volume" --disk-format qcow2 --container-format bare --file "$image" --progress
|
|
||||||
|
# Per osuosl stack admin suggestion, ad long BUILD state:
|
||||||
|
# If you want it faster, I recommend you upload it as raw otherwise the
|
||||||
|
# hypervisor has to import the image into Ceph every time you build a new
|
||||||
|
# VM.
|
||||||
|
# (this decreases the BUILD time from 3 minutes to < 20s)
|
||||||
|
file=/tmp/raw-image
|
||||||
|
rm -rf "$file"
|
||||||
|
qemu-img convert "$image" "$file"
|
||||||
|
glance image-create \
|
||||||
|
--name "$new_volume" \
|
||||||
|
--disk-format raw \
|
||||||
|
--container-format bare \
|
||||||
|
--file "$file" --progress
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue