Cloud-init is a Linux package responsible for handling early initialization of instances. If available in the distributions, it allows for configuration of many common parameters of the instance directly after installation. This creates a fully functional instance that is configured based on a series of inputs. The cloud-init config is composed of two main configuration files, the metadata file and the user-data file. The meta-data contains the network configuration for the Edge, and the user-data contains the Edge Software configuration. The cloud-init file provides information that identifies the instance of the VMware Virtual Edge being installed.
Cloud-init's behavior can be configured via user-data. User-data can be given by the user at the time of launching the instance. This is typically done by attaching a secondary disk in ISO format that cloud-init will look for at first boot time. This disk contains all early configuration data that will be applied at that time.
The VMware Virtual Edge supports cloud-init and all essential configurations packaged in an ISO image.
Create the cloud-init metadata and user-data Files
The final installation configuration options are set with a pair of cloud-init configuration files. The first installation configuration file contains the metadata. Create this file with a text editor and name it meta-data. This file provides information that identifies the instance of the VMware Virtual Edge being installed. The instance-id can be any identifying name, and the local-hostname should be a host name that follows your site standards.
- Create the meta-data file that contains the instance:
name.instance-id: vedge1
local-hostname: vedge1
- Add the
network-interfaces
section, shown below, to specify the WAN configuration. By default, all SD-WAN Edge WAN interfaces are configured for DHCP. Multiple interfaces can be specified.root@ubuntu# cat meta-data instance-id: Virtual-Edge local-hostname: Virtual-Edge network-interfaces: GE1: mac_address: 52:54:00:79:19:3d GE2: mac_address: 52:54:00:67:a2:53 GE3: type: static ipaddr: 11.32.33.1 mac_address: 52:54:00:e4:a4:3d netmask: 255.255.255.0 gateway: 11.32.33.254 GE4: type: static ipaddr: 11.32.34.1 mac_address: 52:54:00:14:e5:bd netmask: 255.255.255.0 gateway: 11.32.34.254
- Create the user-data file. This file contains three main modules: SD-WAN Orchestrator, Activation Code, and Ignore Certificates Errors.
Module Description vco
IP Address/URL of the SD-WAN Orchestrator. activation_code
Activation code for the Virtual Edge. The activation code is generated while creating an Edge instance on the SD-WAN Orchestrator. vco_ignore_cert_errors
Option to verify or ignore any certificate validity errors. The activation code is generated while creating an Edge instance on the SD-WAN Orchestrator.
Important: There is no default password in SD-WAN Edge image. The password must be provided in cloud-config:#cloud-config password: passw0rd chpasswd: { expire: False } ssh_pwauth: True velocloud: vce: vco: 10.32.0.3 activation_code: F54F-GG4S-XGFI vco_ignore_cert_errors: true
Create the ISO File
Once you have completed your files, they need to be packaged into an ISO image. This ISO image is used as a virtual configuration CD with the virtual machine. This ISO image (called seed.iso in the example below), is created with the following command on Linux system:
genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data network-data
Including the network-interfaces
section is optional. If the section is not present, the DHCP option is used by default.
Once the ISO image is generated, transfer the image to a datastore on the host machine.