In the method named from_api in nova/block_device.py,
if source_type == 'image' and destination_type == 'local':
raise exception.InvalidBDMFormat(
details=_("Mapping image to local is not supported."))
While, in the method named _boot in novaclient/v2/servers.py
if image:
bdm_dict = {'uuid': image.id, 'source_type': 'image',
'destination_type': 'local', 'boot_index': 0,
'delete_on_termination': True}
block_device_mapping_v2.insert(0, bdm_dict)
Because of the above, if using --image and --block-device
params at the same time to create vm, nova would
raise InvalidBDMFormat exception
To resolve this problem, remove the codes in novaclient which
conflict with nova
Change-Id: I488322ba0160100a6d641fde68fa824d0581956a
Closes-Bug:#1418484