Login problem with cloud-init and Proxmox

Hi,

I’m trying to configure cloud-init on Vyos and used the cloud-init guide on VyOS page.

I’ve created the qcow image, created the 3 files following the examples only changing IP’s, created the seed.iso and deployed without a problem and everything worked and i was able to login with login/password vyos

The problem is when i try to do any changes in the user-data file i cannot login using vyos login/password.

For example add “set system name-server 1.1.1.1” or “set system login user vyos authentication encrypted-password password”. What I’ve tried is create another qcow image with “-e keep_user=true” but did not work

My user data is the same as the link example and only added name-server option
#cloud-config
vyos_config_commands:

  • set system host-name ‘vyos-BRAS’
  • set service ntp server 1.pool.ntp.org
  • set service ntp server 2.pool.ntp.org
  • delete interfaces ethernet eth0 address ‘dhcp’
  • set interfaces ethernet eth0 address ‘198.51.100.2/30’
  • set interfaces ethernet eth0 description ‘WAN’
  • set interfaces ethernet eth1 address ‘10.0.0.1/24’
  • set interfaces ethernet eth1 description ‘VLAN’
  • set system name-server 1.1.1.1
  • set protocols static route 0.0.0.0/0 next-hop ‘198.51.100.1’

After boot i can see only that the hostname changed

Using image vyos-1.5-rolling-202412031443-generic-amd64

Thanks

that image doesn’t support cloud-init , that is why you have those problems. generic image doesn’t support cloud-init.

Hi,

That’s why i’ve created the a new qcow2 file with cloud-init with the command:

sudo ansible-playbook qemu.yml -e disk_size=4
-e iso_local=/tmp/vyos-1.5-rolling-202411270007-generic-amd64.iso -e grub_console=serial -e vyos_version=1.5-rolling-202411270007
-e cloud_init=true -e cloud_init_ds=NoCloud -e keep_user=true

And with the default user-data show in the site it works and i can even add a new IP with Proxmox cloud-init. The problem is only when adding new commands on user-data

Thanks for your help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.