In case there is a device name provided it will use the legacy bdm, but if the default is "NOTSET" it will create a new bdm. I'm not sure about the legacy part, which consequences there could be, I just tried it without changing that part.
Maybe it should be changed to bdm_v2, too. Anyway, with these changes I could launch an instance from volume with a non-default device name (/dev/sda), also attaching another volume results in a correct device name in horizon/cinder and from within the VM (/dev/sdb).
Ok, after some trial & error it seems like this works for volume -> volume:
---cut here--- tFromVolumeDevi ce(finalSpec, sourceType) { vol_device_ name ? finalSpec. vol_device_ name : null; vol_device_ name=== 'NOTSET' ){
finalSpec. block_device_ mapping_ v2 = [];
finalSpec. block_device_ mapping_ v2.push(
'source_ type': bootSourceTypes .VOLUME,
'destinati on_type' : bootSourceTypes .VOLUME,
'delete_ on_termination' : finalSpec. vol_delete_ on_instance_ delete, source_ id,
'boot_ index': '0'
finalSpec. block_device_ mapping = {};
finalSpec. block_device_ mapping[ finalSpec. vol_device_ name] = [
finalSpec. source_ id,
sourceType,
finalSpec. vol_delete_ on_instance_ delete .source_ id = '';
function setFinalSpecBoo
var deviceName = finalSpec.
if (finalSpec.
{
'uuid': finalSpec.
}
);
}
else {
':',
'::',
].join('');
}
finalSpec
}
---cut here---
In case there is a device name provided it will use the legacy bdm, but if the default is "NOTSET" it will create a new bdm. I'm not sure about the legacy part, which consequences there could be, I just tried it without changing that part.
Maybe it should be changed to bdm_v2, too. Anyway, with these changes I could launch an instance from volume with a non-default device name (/dev/sda), also attaching another volume results in a correct device name in horizon/cinder and from within the VM (/dev/sdb).