VyOS - automate installation

Hello community,

I’ve been trying for weeks to configure VyOS using some form of automation with cloud-init but it doesn’t seem to work correctly.
I’ve made a new VM, install image, reboot, disconnect the VyOS ISO, connect seed.iso as described here and when I boot from the HDD, the config does not get applied.
Same behaviour for when doing this on a live iso that I compiled, at boot time before doing install image Looking closer to how the interfaces are getting setup, it looks like cloud-init is using / configuring the interfaces in /etc/systemd/network/10-cloud-init-eth0.network whereas VyOS seems to overwrite (?) or use different network manager.

Is it possible to instruct VyOS to work together with cloud-init in that regard?
I’ve tried already to deploy from .OVA/.VMDK and it doesn’t work either.

PS: In the boot sequence, I can see that cloud-init is running and has configured the NICs, and last steps in the boot process are 3 lines:

[OK] Finished cloud-final.service: Execute cloud user/final scripts. 
[OK] Reached target cloud-init.target - Cloud-init target. 
vyos-router: Mounting VyOS Config…done 
vyos-router: Starting VyOS router: migrate configure. 
vyos-router: Configuration success

Which makes me believe that VyOS is “overwritting” everything that cloud-init has done, to a degree?

Any help or feedback is greatly appreciated.

Thank you very kindly!

1 Like


you have to adjust the original vyos image


attention here the ansible script wan´t to check the old download url, that must be fixed by hand

after adjusting works as expected.


Any idea about to create vyos image for azure? the script always broken.

The steps / documentation and resulted build are broken. I had to change lots of things to make the ansible playbooks work, and cloud-init still isn’t installed.

Documentation is lacking a lot.
I wish I new what I know now, 3 weeks ago when I started, and I could have used the time to help the community, and improve on documentation…

You don’t need “install image” for cloud-init compatible images. We said it several times. If you do “install image” you completely doing something wrong.
We are mostly on all famous clouds (google, azure, aws, oracle, equinix, etc). What I can say it is impossible to be in a cloud without working cloud-init feature.

What did you fix for ansible? Did you open any bug report? Which VyOS version are you using? Is it 1.2, 1.3, 1.4, 1.5?
Feel free to create a bug report or create a PR with your changes.

Hi @Viacheslav, As said many times so far, I am not doing this in a cloud environment. I’m trying to achieve this in VMware Workstation, through a LIVE ISO, in a very closed environment, where access to internet, or PXE boot is not possible, and the feature advertised in the documentation isn’t specific on the fact that cloud-init is overwritten by config.boot, or that it cannot support unattended installations.

I was relying on NoCloud and CIDATA volume being seed into VyOS, and the configs are read, but get ovewritten by config.boot.

I am using the latest 1.4. For Ansible, I had to change the vmware.yml to localhost, because it wouldn’t correctly understand / read the hosts file.
and the other part to fix was as someone else mentioned attention here the ansible script wan´t to check the old download url, that must be fixed by hand

I have not raised a bug or PR, because I’m still trying to understand the extent of the changes, and what actually needs “fixing” or made clearer in documentation.