Static IP address

Hello,
I trying figure out how to set up static IP address in Debian 12 Container. I have working bridge profile which is assign to Debian host. This container getting IP address from dhcp server. Problem start when I want to set static IP address for this Debian container. Inside container there is missing /etc/network/interfaces
I also try create new profile with manually set IP address like this:

    config:
  user.network-config: |
    version: 1
    config:
      - type: physical
        name: eth0
        subnets:
          - type: static
            ipv4: true
            address: 192.168.0.4/24
            gateway: 192.168.0.1
            dns:
              nameservers:
                - 192.168.0.254
description: fnsds01 static IP profile
devices:
  eth0:
    nictype: bridged
    parent: br1
    type: nic
name: static-fnsds01
used_by: []

But container still obtain IP address from DHCP. I am getting out of ideas how to set up correctly. Thank you for any help.

Hi there,

Are you using images from image: remote?

If so then these images are not support by Canonical (only the ubuntu: remote is), but you can ask over at https://discuss.linuxcontainers.org/ for help with these images.

If you set the IP config manually using the ip command does it work? If so then I suspect there is an issue with cloud-init?

Hello,
Thank you for the quick reply. I am using images: for install

lxc launch images:e5649e1614ff lxd-debian-test like so.

ip command for add static IP work but it is not persistent.