Hi Dmitriy, thanks for your response! It looks like this option is new in Wallaby and it looks like it would address my use-case. I'll grab newer client utils and see whether it works. -- Kurt On 06.07.22 13:56, Dmitriy Rabotyagov wrote:
Hey!
delete_on_termination is a flag that is provided to nova during volume attachment basically. So in case of attaching volume to existing server, you can provide that flag to attachment:
openstack server add volume --enable-delete-on-termination --os-compute-api-version 2.79 $UUID
It's more complex when we're talking about server creation though. What openstackclient allows you to do, is to provide --block-device flag, where you can provide extra specs to the mapping. You can check doc on how to use it here https://docs.openstack.org/python-openstackclient/yoga/cli/command-objects/s...
For API call it would be block_device_mapping_v2 option provided with request which supports kind of same format: https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail#cr...
ср, 6 июл. 2022 г. в 13:21, Kurt Garloff <openstack@garloff.de>:
Hi openstack CLI wizards,
Having flavors without disks, I want volumes to be created from images on the fly that I can boot from. But I don't want to do bookkeeping for these volumes; they should disappear once the server disappears.
On the command line with nova, I can do this: nova boot --nic net-name=$MYNET --key-name $MYKEY --flavor $MYFLAVOR \ --block-device "id=$MYIMGIFD,source=image,dest=volume,size=$MYSIZE,shutdown=remove,bootindex=0" $MYNAME
I did not find a way to do this with openstack server create. Is there one? [...]