'Create the BlockDeviceMapping objects in the db.
This method makes a copy of the list in order to avoid using the same
id field in case this is called for multiple instances.'

def _create_block_device_mapping(self, cell, instance_type, instance_uuid, block_device_mapping):

    LOG.debug('block_device_mapping    %s', list(block_device_mapping), instance_uuid=instance_uuid)
    instance_block_device_mapping = copy.deepcopy(block_device_mapping)
    for bdm in instance_block_device_mapping:
        bdm.volume_size = self._volume_size(instance_type, bdm)
        bdm.instance_uuid = instance_uuid
        with obj_target_cell(bdm, cell):
            bdm.update_or_create()
    return instance_block_device_mapping
