Project feature images

lxc server config:
storage.images_volume: pl/images

lxc project x:

config:
  features.images: "true"

changing to features.images: “false” throws:

Features can only be changed on empty projects
As project already has numerous containers, purging and recreating is no option.

This has worked:
lxd sql global 'UPDATE "projects_config" SET "value" = "false" WHERE "project_id" = "111" AND "key" = "features.images"'

Is there also a way to lend an image to another project? Seems images can be moved around the world, but within same server projects.
Work around is:

  • export image, switch profile, import, though image properties are lost and need to be maintained again.

or

  • lxd sql global (table images clone the desired row with ‘project’ field as destination project_id).
    images_aliases and images_properties tables need to be triggered as well, just in case.

Although you’ve manually overridden the validation logic by setting the feature manually, the reason that validation is there is to prevent a project getting into an inconsistent state, in this case having instances created from images that don’t exist in the project but are now expected to be.

You may well hit unexpected issues in the future with this change.