<div dir="ltr">Hello,<br><br>I've been doing some research about file injection in VM instances at boot time, I found[1] that there are several ways of doing it, including mounting images[2] (using guestfs, loops and nbd), using config drive (creating a device and making it available to mount it in the instance) and using the metadata service (cloud-init).<br><br>However I also found that file injection was disabled by default in the Icehouse release[3]:<br>"File injection is now disabled by default in OpenStack Compute. Instead it is recommended that the ConfigDrive and metadata server facilities are used to modify guests at launch. To enable file injection modify the inject_key and inject_partition configuration keys in /etc/nova/nova.conf and restart the Compute services. The file injection mechanism is likely to be disabled in a future release."<br><br>In addition, the blueprint[4] about this mentions that this could be deprecated in the future:<br><br>"With ConfigDrive and Metadata service combined there is no need for fiddling inside VM images at deployment time - images can consult metadata locally (configdrive) or network (metadata service).<br>Disabling it by default is thus sane, and we can review whether to deprecate and remove it entirely in future."<br><br><br>I've also asked in #openstack-operators (thanks to folks there for pointing out all this useful information) for the most used way for injecting files in instances and (IIRC) they said that cloud-init + config drive were the common methods.<br><br>Now my questions are:<br><br>- Is this (file injection using image mounting) likely to be deprecated at some point in the future?<br>- What functionality is missing (if any) in config drive / metadata service solutions to completely replace file injection?<br>- Which of them is the fastest and most secure?<br><br>I would appreciate any comment or corrections in my research about this topic, I'm still learning about Openstack :-)<br><br>[1] - <a href="https://kimizhang.wordpress.com/2014/03/18/how-to-inject-filemetassh-keyroot-passworduserdataconfig-drive-to-a-vm-during-nova-boot/" target="_blank">https://kimizhang.wordpress.com/2014/03/18/how-to-inject-filemetassh-keyroot-passworduserdataconfig-drive-to-a-vm-during-nova-boot/</a><br>[2] - <a href="https://www.berrange.com/posts/2012/11/15/692/" target="_blank">https://www.berrange.com/posts/2012/11/15/692/</a><br>[3] - <a href="https://wiki.openstack.org/wiki/ReleaseNotes/Icehouse#OpenStack_Compute_.28Nova.29" target="_blank">https://wiki.openstack.org/wiki/ReleaseNotes/Icehouse#OpenStack_Compute_.28Nova.29</a><br>[4] - <a href="https://blueprints.launchpad.net/nova/+spec/disable-file-injection-by-default" target="_blank">https://blueprints.launchpad.net/nova/+spec/disable-file-injection-by-default</a><br><br>--<br>Simental Magana Marcos<br>GPG unsigned</div>