]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Volume from non-streamOptimized image
authorVipin Balachandran <vbala@vmware.com>
Sun, 29 Jun 2014 13:32:20 +0000 (19:02 +0530)
committerVipin Balachandran <vbala@vmware.com>
Fri, 1 Aug 2014 13:43:59 +0000 (19:13 +0530)
commit5eac161aa81a68e7cc4adb92798f6c3e849da81c
tree9d8fa3a2f3185e178a8e40e02331bfec4f53a85c
parent5f24034a45b97ef023df4517e66c7e8191ef2c6d
VMware: Volume from non-streamOptimized image

Volume creation from non-streamOptimized images (preallocated/thin/sparse)
has following problems:

1) Sparse vmdk image is not converted to appropriate virtual disk type
   suitable for attaching to a nova instance.
2) The adapter type in image meta-data is ignored while creating volumes.
3) The vmware:vmdk_type extra_spec property is ignored.
4) Virtual disk extent operation is called with a wrong parameter which
   might result in unwanted disk provisioning type conversion.

This patch fixes the first 3 problems using the following workflow:

a) Create a disk-less backing.
b) Create a virtual disk (single flat extent) from the non-streamOptimized
   image
c) Attach the virtual disk to the backing
d) Clone the backing (if needed) to perform disk provisioning type conversion

Closes-Bug: #1287176
Closes-Bug: #1287185
Closes-Bug: #1284284
Change-Id: Ib7e9fae81d69d2fe490a4b603337f3d5cee1138c
cinder/tests/test_vmware_vmdk.py
cinder/volume/drivers/vmware/vmdk.py