openstackclient: booting from image-created volume w/ delete_on_termination
Kurt Garloff
openstack at garloff.de
Wed Jul 6 11:15:38 UTC 2022
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?
Here's what I tried:
--image $MYIMGID --boot-from-volume $MYSIZE
works, except that there is no way to specify delete_on_termination
--block-device-mapping "sda=$MYIMGID:image:$MYSIZE:true"
does complain that no --image or --volume have been passed.
The option does not appear to be used for bootable volumes.
I have seen a BP (merged with Ussuri) that would allow a PUT call to
update delete_on_termination, but I don't see it usable with the
openstackclient ...
https://specs.openstack.org/openstack/nova-specs/specs/ussuri/implemented/destroy-instance-with-datavolume.html
Anything obvious I missed?
Thanks,
--
Kurt Garloff <kurt at garloff.de>
Cologne, Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220706/08de9639/attachment.htm>
More information about the openstack-discuss
mailing list