express42 / packer-builder-selectel

3 stars 1 forks source link

Compress resulting images #13

Closed vitkhab closed 7 years ago

vitkhab commented 7 years ago

Volume image upload produces image in raw format. The size of the image equals to volume size.

Investigation needed if there is any possible way to automatically compress resulting images.

vitkhab commented 7 years ago
openstack image create --volume b4450695-9bdb-4d50-b286-0d14ef7706ee --disk-format qcow2 test-image

Works and converts image from raw to qcow2 format. Resulting image size is 1,25 GB instead of 5 GB. It's good. But if there is a way to produce compressed qcow2 imaged it will be even better.

vitkhab commented 7 years ago

It doesn't seem to be possible in current implementation. I've investigated till here https://github.com/openstack/glance/blob/master/glance/async/flows/convert.py#L117-L121

vitkhab commented 7 years ago

Added disk_format variable. Now it's possible to convert images into qcow2 format.

Compression should be implemented in openstack first and won't be fixed till that.