How to get persistent IP with ovn network

Not sure whether this is the expected behaviour:


# lxd --version
5.13

# lxc network show ovn1
config:
  bridge.mtu: "1442"
  ipv4.address: 10.177.66.1/24
  ipv4.dhcp: "true"
  ipv4.nat: "true"
  ipv4.nat.address: 10.208.133.19
  network: UPLINK
  volatile.network.ipv4.address: 10.208.133.21
description: ""
name: ovn1
type: ovn
used_by:
- /1.0/instances/nc02
- /1.0/instances/nc03
- /1.0/profiles/default
managed: true
status: Created
locations:
- node01
- node02
- node03

# lxc ls          
+------------+---------+--------------------+------+-----------+-----------+----------+
|    NAME    |  STATE  |        IPV4        | IPV6 |   TYPE    | SNAPSHOTS | LOCATION |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc02       | STOPPED |                    |      | CONTAINER | 0         | node01   |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc03       | RUNNING | 10.177.66.2 (eth0) |      | CONTAINER | 0         | node02   |
+------------+---------+--------------------+------+-----------+-----------+----------+
# lxc start nc02
# lxc ls
+------------+---------+--------------------+------+-----------+-----------+----------+
|    NAME    |  STATE  |        IPV4        | IPV6 |   TYPE    | SNAPSHOTS | LOCATION |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc02       | RUNNING | 10.177.66.4 (eth0) |      | CONTAINER | 0         | node01   |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc03       | RUNNING | 10.177.66.2 (eth0) |      | CONTAINER | 0         | node02   |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nfs-server | STOPPED |                    |      | CONTAINER | 0         | node03   |
+------------+---------+--------------------+------+-----------+-----------+----------+
# lxc stop nc03
# lxc stop nc02
# lxc start nc02
# lxc ls
+------------+---------+--------------------+------+-----------+-----------+----------+
|    NAME    |  STATE  |        IPV4        | IPV6 |   TYPE    | SNAPSHOTS | LOCATION |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc02       | RUNNING | 10.177.66.2 (eth0) |      | CONTAINER | 0         | node01   |
+------------+---------+--------------------+------+-----------+-----------+----------+
| nc03       | STOPPED |                    |      | CONTAINER | 0         | node02   |
+------------+---------+--------------------+------+-----------+-----------+----------+

The IP is not the same after the reboot. It’s a different behaviour with respect to a “normal” network.
I’m using the Ubuntu jammy amd64 (20230523_07:42) image (id: a7e10bb9212b).

This will be fixed in lxd 5.14

Good news!