Oh, I see. Thank you very much. It's just hard coded for attaching volume and swapping volume.
How to deal the bp: https://blueprints.launchpad.net/nova/+spec/add-delete-on-termination-option ? 2014/1/9 Christopher Yeoh <cbky...@gmail.com>: > On Thu, Jan 9, 2014 at 2:35 PM, 黎林果 <lilinguo8...@gmail.com> wrote: >> >> Hi Chris, >> Thanks for you reply. >> >> It's not only hard coded for swap volumes. In function >> '_create_instance' which for creating instance of nova/compute/api.py, >> the '_prepare_image_mapping' function will be called. And it hard code >> to True, too. >> >> values = block_device.BlockDeviceDict({ >> 'device_name': bdm['device'], >> 'source_type': 'blank', >> 'destination_type': 'local', >> 'device_type': 'disk', >> 'guest_format': guest_format, >> 'delete_on_termination': True, >> 'boot_index': -1}) >> > > Just before that in _prepare_image_mapping is: > > if virtual_name == 'ami' or virtual_name == 'root': > continue > > if not block_device.is_swap_or_ephemeral(virtual_name): > continue > > > Chris > > > _______________________________________________ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev