When instantiating VOS device in the virtual environment, such as KVM, Openstack or cloud, you may want it to automatically onboard right after installation. To do that you can use cloud-init functionality, which we support in VOS™.
Here is an example cloud-init file which can be used for the configuration of eth0 interface and staging of the VOS after the boot.
cloud_init_modules: - write-files - set_hostname - update_hostname - users-groups - ssh write_files: - content: | # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.0.230 netmask 255.255.255.0 gateway 192.168.0.1 path: /etc/network/interfaces - content: | #!/bin/bash logger running staging script sudo /opt/versa/scripts/staging.py -l SDWAN-Branch@bk.com -r controller-1-staging@bk. permissions: "0755" path: /home/admin/versa.sh cloud_final_modules: - runcmd - scripts-user runcmd: - /home/admin/versa.sh
NOTE: it is very important to keep all the spaces at the end of each line for the file to work. JAML is very sensitive for the spaces, which serve as indicators of beginning of the next action.