Defined devices and configs in the profile do not apply to new instances!

I create a new profile by copying the default profile and then edit it and add some configs and devices:

l profile show test

  boot.autostart: "false"
  limits.cpu: "8"
  limits.memory: 8GB
  user.user-data: |
      - ssh-ed25519  ****
description: can be deleted
    name: eth0
    network: lxdbr0
    type: nic
    path: /
    pool: main
    size: 40GB
    type: disk
    connect: tcp:
    listen: tcp:
    type: proxy
name: test

When I create a new instance using this profile:

l launch images:ubuntu/22.04/cloud test -p test

Defined devices and configs in the profile do not apply to new instances!

l config show test

architecture: x86_64
  image.architecture: amd64
  image.description: Ubuntu jammy amd64 (20230106_09:09)
  image.os: Ubuntu
  image.release: jammy
  image.serial: "20230106_09:09"
  image.type: squashfs
  image.variant: cloud
  volatile.base_image: 6b369bdd93aeaf42261f696f58705dfecc5077de7a58f647d4649a0704f7951e 17a30f26-efec-41ae-a0af-abbb73270a22
  volatile.eth0.host_name: veth7d11d5d1
  volatile.eth0.hwaddr: 00:16:3e:ce:f4:86
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.power: RUNNING
  volatile.uuid: f4843a8a-ffa5-4e3b-bd90-42017a2f29e0
devices: {}
ephemeral: false
- test
stateful: false
description: ""

Does someone know what is wrong here?

lxc config show <instance> by itself only shows config directly assigned to the instance.
However using lxc config show <instance> --expanded shows the effective config that the instance uses with profiles applied.

1 Like

Thanks for your quick reply.