cloud-init custom UUID?
Hi colleagues,
brief googling didn't answer whether it's possible to configure cloud-init to use custom UUID (e.g. provided in metadata) instead of one provided by Openstack.
Whether it's possible to configure cloud-init in this manner?
Thank you.
If I understand your question correctly (do you mean the "ID" column in "openstack server list"?), I don't think that there's a way. Cloud-init is processed after the instance has been created initially by openstack, so it also creates the UUID before the rest of the launch sequence proceeds.
Sure and there is no way to say Openstack "create VM with this UUID", that's why I want to use custom UUID. When I need to resize root volume, I need to delete VM (to make volume 'available'), then resize it and then create VM back.
Openstack will create it with new UUID and cloud-init will do all things as for new VM, while in fact it's same VM and I don't need new ssh keys, etc on the production VM :) Instead I will use own ID in metadata and point cloud-init on this value instead of system's UUID.
You don't need to recreate your instance to resize a root volume, if that's all what the question is about. You simply shutdown the vm, make the volume available, resize it and set the state back to attached, then boot your vm and it will have the larger volume.
This should do it: