[RFE] azure-init should not attempt to provision the VM on reboot #120
Open
Description
opened on Aug 28, 2024
azure-init pulls data from IMDS to configure the VM and reports health on every boot. This has some implications:
- Unnecessary communication with wireserver (goalstate and health). If there is an issue with wireserver communication, this might unnecessarily delay boot if there are components that run after azure-init. azure-init. The extra health reporting is currently harmless, but should be avoided if possible.
- If the user makes a change to the hostname, azure-init will update the hostname back to the value found in IMDS. This is often undesirable (however, the other side of this argument is that the customer can update the hostname in the VM, and they would like to see the VM hostname updated upon reboot). This should be addressed with a configurable option (cloud-init has has a similar option)
**Implementation options
The easiest option is to write a file (/var/lib/azure-init/cache, e.g.,) with the existing vm id. vm id is available in IMDS, it's also available by reading the uuid provided by dmidecode -- see here. Using the id from dmidecode is preferred because it avoids unnecessary communication (IMDS), it also will work in the event that IMDS is down.
Upon reboot, azure-init checks if the vm id has changed (which means that this is a new VM), and if yes, it should proceed with provision the VM.
Activity