'Creates a flat extent virtual disk from sparse vmdk image.'

def _create_virtual_disk_from_sparse_image(self, context, image_service, image_id, image_size_in_bytes, dc_ref, ds_name, folder_path, disk_name):

    src_disk_name = uuidutils.generate_uuid()
    src_path = volumeops.MonolithicSparseVirtualDiskPath(ds_name, folder_path, src_disk_name)
    LOG.debug('Creating    temporary    virtual    disk:    %(path)s    from    sparse    vmdk    image:    %(image_id)s.', {'path': src_path.get_descriptor_ds_file_path(), 'image_id': image_id})
    self._copy_image(context, dc_ref, image_service, image_id, image_size_in_bytes, ds_name, src_path.get_descriptor_file_path())
    dest_path = volumeops.FlatExtentVirtualDiskPath(ds_name, folder_path, disk_name)
    self._copy_temp_virtual_disk(dc_ref, src_path, dc_ref, dest_path)
    LOG.debug('Created    virtual    disk:    %s    from    sparse    vmdk    image.', dest_path.get_descriptor_ds_file_path())
    return dest_path
