How to setup routed nic inside fedora 33 container?

@Dakado

I found that the Fedora cloud-init wasn’t applying the network config from @simos blog post.
It may be that because the interface already has an address, the NetworkManager is leaving it alone (the connection in nmcli showed it as being configured externally).

However you can automate the steps you documented above using a cloud-init profile as follows:

lxc profile show routed
config:
  user.user-data: |
    #cloud-config
    bootcmd:
      - nmcli connection modify "System eth0" ipv4.addresses 192.168.1.201/32
      - nmcli connection modify "System eth0" ipv4.gateway 169.254.0.1
      - nmcli connection modify "System eth0" ipv4.dns 8.8.8.8
      - nmcli connection modify "System eth0" ipv4.method manual
      - nmcli connection down "System eth0"
      - nmcli connection up "System eth0"
description: Default LXD profile
devices:
  eth0:
    ipv4.address: 192.168.1.201
    name: eth0
    nictype: routed
    parent: enp3s0
    type: nic
name: routed