@Daniel, > One convenience we could potentially provide: if cloud-init had a way > for image creators to express "when next launched, cloud-init should > treat that instance ID as immutable and permanent" (in a way that could > be undone on subsequent boots, if a user wants to "unfreeze" an instance > for image capture) then we might be able to avoid some of this pain, but > that idea would need more fleshing out before it's clear if it even > makes sense.
I think you're basically describing "manual_cache_clean". The intent (testing is needed) for manual_cache_clean is that a.) user-data and system config (/etc/cloud/*.cfg) can set manual_cache_clean to true or false. As always user-data overrides system config. vendor-data should also be able to provide the setting. b.) cloud-init renders /var/lib/cloud/instance/manual-clean (path_helper.get_ipath_cur("manual_clean_marker")) if c.) on boot, both ds-identify and cloud-init will check and respect existance of /var/lib/cloud/instance/manual-clean So... "unfreeze", if manual_cache_clean was set is just: rm -Rf /var/lib/cloud/instance /var/lib/cloud/instance/ I think it would be good to both test that my intent/understanding are correct, and document it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1885527 Title: cloud-init regenerating ssh-keys To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1885527/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs