You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using jinja templates for cloud-init, it's very convenient to pass custom values in by user.* and then access them by ds.config.user_*. Here is a LXD profile demonstrating an example.
If you were to launch this profile on a jammy or later vm, or any container, it should create a user named test with the password test instead of the ubuntu user.
Now, add a config drive to the profile under the devices section:
devices:
config:
source: cloud-init:configtype: disk
Now, the user.username and user.password variables don't get passed in via the NoCloud datasource. Therefore, the default ubuntu user is created instead. This occurs because the variables were not actually passed into the meta-data file in the root of /dev/sr0 which the drive added. Therefore, no custom variables can be passed to instances launched using this method.
Currently, this breaks tooling using Focal vms as a base image, such as those trying to reproduce Ubuntu FIPS issues because Focal does not properly implement the standard LXD datasource.
The text was updated successfully, but these errors were encountered:
When using jinja templates for cloud-init, it's very convenient to pass custom values in by
user.*
and then access them byds.config.user_*
. Here is a LXD profile demonstrating an example.If you were to launch this profile on a jammy or later vm, or any container, it should create a user named
test
with the passwordtest
instead of theubuntu
user.Now, add a config drive to the profile under the devices section:
Now, the
user.username
anduser.password
variables don't get passed in via the NoCloud datasource. Therefore, the defaultubuntu
user is created instead. This occurs because the variables were not actually passed into themeta-data
file in the root of/dev/sr0
which the drive added. Therefore, no custom variables can be passed to instances launched using this method.Currently, this breaks tooling using Focal vms as a base image, such as those trying to reproduce Ubuntu FIPS issues because Focal does not properly implement the standard LXD datasource.
The text was updated successfully, but these errors were encountered: