This article describes steps which can be performed to troubleshoot the vSRX loading with the factory default configuration instead of configuration used in Cloud-Init in OpenStack and AWS environments.
A few different issues may occur when initialization of the vSRX instances is automated using Cloud-Init. Three cases where the the vSRX loads with the factory default are listed below.
Note: The cloud-init log file is located in WRL at: /var/log/cloud-init.log
Case 1: Error reported in boot up log: ERROR: Failed to commit user data configuration!
Case 2: Error reported in boot up log: #junos-config is missing in user-data
is reported
Case 3: No errors reported in boot up log, but vSRX loads with factory default configuration.
- Cloud-init logs contain the string:
#junos-config
Case 1: Error reported in boot up log: ERROR: Failed to commit user data configuration!
- Configuration is incorrect. This indicates that the user provided configuration failed the mgd commit.
- Copy the
/config/juniper_user_data.conf
file to a running vSRX
- In the configuration mode, run the command:
load override <juniper_user_data.conf>
- Confirm the error has been corrected.
Case 2: Error reported in boot up log: #junos-config is missing in user-data
is reported
- Make sure the user-data file contains the string:
#junos-config
Case 3: No errors reported in boot up log, but vSRX loads with factory default configuration.
- Check if the network is unreachable.
- Check if DHCP leases are available.
- Make sure the metadata service is running on the specified IP for the platform
For more details, refer to the following technical documentation links:
Using Cloud-Init to Automate the Initialization of vSRX Instances in AWS
Using Cloud-Init in an OpenStack Environment to Automate the Initialization of vSRX Instances
2019-09-20: Added links to technical documentation for more information.