Add support of ploop images (*.hds extension) for both exe and hvm types.
In devstack we assume that images have '-exe' and '-hvm' suffixes in
their names correspondently.
Change-Id: I1c074876c530be0535a6e02e764d67a4ebcbbbe5
... | ... |
@@ -219,6 +219,23 @@ function upload_image { |
219 | 219 |
return |
220 | 220 |
fi |
221 | 221 |
|
222 |
+ if [[ "$image_url" =~ '.hds' ]]; then |
|
223 |
+ image_name="${image_fname%.hds}" |
|
224 |
+ vm_mode=${image_name##*-} |
|
225 |
+ if [[ $vm_mode != 'exe' && $vm_mode != 'hvm' ]]; then |
|
226 |
+ die $LINENO "Unknown vm_mode=${vm_mode} for Virtuozzo image" |
|
227 |
+ fi |
|
228 |
+ |
|
229 |
+ openstack \ |
|
230 |
+ --os-token $token \ |
|
231 |
+ --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT \ |
|
232 |
+ image create \ |
|
233 |
+ "$image_name" --public \ |
|
234 |
+ --container-format=bare --disk-format=ploop \ |
|
235 |
+ --property vm_mode=$vm_mode < "${image}" |
|
236 |
+ return |
|
237 |
+ fi |
|
238 |
+ |
|
222 | 239 |
local kernel="" |
223 | 240 |
local ramdisk="" |
224 | 241 |
local disk_format="" |