setup cloud-init FreeBSD-14.1BASIC-CLOUDINIT network troubleshooting

hi team!
So i have my template freeBSD cloud-init almost perfect but i'm strugling to configure the network in my cloud-init.yml file
so from the website FreeBSD i got this image: https://download.freebsd.org/releas....1-RELEASE-amd64-BASIC-CLOUDINIT-ufs.qcow2.xz
i configure it:
Code:
freebsd-update fetch install

pkg search cloud-init  # search cloud-init
pkg install py39-cloud-init-24.1.4

# add this line
vi /etc/rc.conf
cloudinit_enable="YES"

pkg install doas
vi /usr/local/etc/doas.conf # add the line below
permit nopass :wheel

Now i have made a template from this new VM
build another VM and run my cloud-init.yml
but i can't setup network configuration, i have tried many config but still nothing, any clue?
Code:
#cloud-config

hostname: freebsd-cloud-instance
manage_etc_hosts: true

network:
  config:
    - type: physical
      name: vtnet0
      mac_address: 'my-mac-address'
      subnets:
        - type: static
          address: 192.168.20.14/27
          gateway: 192.168.20.1

users:
  - name: test
    groups: wheel
    doas:
    - permit nopass test
    ssh_authorized_keys:
    - ssh-rsa your-long-ssh-key.pub
   
runcmd:
  - pw lock root
thx!
 
Back
Top