Vyos cloudinit no login


i want to use cloudinit to deploy my vyos.

I used this ansible script, the script works as excepted.
I got a qcow2 file and use this for deploy the vyos

After the vm is deployed I can´t login with vyos/vyos
must I set the user and the password there in the user-data
any idea?

You should provide more details about the environment where you deploy the router and how you want to use Cloud-init (populate it with config, in other words).

i want to deploy the vyos to my ubuntu 22.04 kvm host.
i created the qcow2 image with the vyos-vm-images

start the vm with the commands

i see the login but i can´t login

my user-data this file is converted to a iso file

cat user-data 
  - set system host-name 'vyos-prod-ashburn'
  - set system ntp server 1.pool.ntp.org
  - set system ntp server 2.pool.ntp.org
  - set interfaces ethernet eth1 address ''
  - set interfaces ethernet eth0 'dhcp'

these snippere are from here


here the command to start the vm

virt-install -n vyos_r1 \
   --ram 4096 \
   --vcpus 2 \
   --cdrom seed.iso \
   --os-type linux \
   --os-variant debian10 \
   --network network=default \
   --graphics vnc \
   --hvm \
   --virt-type kvm \
   --disk path=/var/lib/libvirt/images/vyos-1.4.0-cloud-init-5G-qemu.qcow2,bus=virtio \
   --import \

What command did you use to create a qcow2 image? It is better to check, just in case something was not configured properly there.

Does your seed.iso contains a meta-data file? It is mandatory for NoCloud, even if empty.

Also, you can reset credentials via the boot menu, log in and grab /var/log/cloud-init.log for analysis.

this was the command to generate the qcow2 image

ansible-playbook qemu.yml -e disk_size=5 -e iso_local=/tmp/vyos.iso -e grub_console=serial -e vyos_version=1.4.0 -e cloud_init=true -e cloud_init_ds=NoCloud

What about the rest? :slight_smile:

of course, I have attached the cloud-init.log file
cloud-init.log (98.3 KB)

Hello @tomcat667

Try adding the option::
-e keep_user=true
Keep default vyos user with password vyos in configuration when building an image with Cloud-init (default: false)

Hi @RyVolodya

thx for this hint.

i have tried the option but not does not work

The log you provided was cleaned up before you got it - it does not contain parts that really matter. Most likely, because this was not the first boot of the system.

You should deploy VyOS in the way you want, boot for the first time, then recover access via the boot menu, boot again and grab the log file.

hmm i mean i found my mistake, but i don´t understand.

in user-data i filled up my test commands

edit user-data and filled in with following configs.

  - set system host-name 'vyos-prod-ashburn'
  - set system ntp server 1.pool.ntp1.org
  - set system ntp server 2.pool.ntp1.org

meta-data is empty only created with touch meta-data
i have created a seed.iso
with this command
mkisofs -joliet -rock -volid "cidata" -output seed.iso meta-data user-data

after this the vyos breaks.
Boot up the vyos without seed.iso it works as espected with the commands that will be used with the ansible-script but i need more commands.

here are the log files, sorry for delay.

cloud-init-output.log (2.7 KB)
cloud-init.log (117.7 KB)

I tested also Version 1.3 that works as expected

login works fine

my three config changes, hostname and ntp settins are there

Check the configuration and versions

set system ntp server x.x.x.x


set service ntp server x.x.x.x
1 Like

copy and paste error
I have not paid attention to the version differences between 1.3 and 1.4

my bad

thx for this big hint

here again with following up

login works fine and the other options are set well.
any idea?

cat user-data

  • set system host-name ‘vyos-prod-moep’
  • set service ntp allow-client address ‘’
  • set service ntp server

start the command from hand