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

vesuvienne

Member
Jun 7, 2024
82
3
8
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!
 
Last edited:
I'm looking towards building a VM template using this image as well, and as far as I can tell, neither the user nor the network info is taking into account. I think I'll try chatting to FreeBSD people over on freebsd-stable@lists.freebsd.org.
 
Ah, I see, even though the image name metions cloudinit, it doesn't seem to be installed.
 
So it seems that FreeBSD comes with nuageinit, which has a very limited set of supported cloud init formats. I'm trying to install cloud-init from packages and see how well that works.
 
That seems to work quite well. After installing py311-cloud-init-24.1.4_1, disabling nuageinit and enabling cloudinit, and rebooting, I now have the network config I set in PVE.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!