3.6.4 Triggering Configuration Changes

There are a variety of approaches that can be used to trigger a configuration change using ovm-template-config. Most commonly, this is done by setting the ovmd service to run using in enable-initial-config mode. This causes the virtual machine to wait to be provided with configuration parameters either on via the console, or via the ovmd messaging facility, after the next boot. This is the usual approach when configuring a virtual machine to act as a template.

To manually force ovmd to pass messages to the ovm-template-config script, simply run ovmd with the --script parameter set to point to one of the ovm-template-config targets:

# ovmd --list
# ovmd -s configure

To perform an action using messaging parameters and ovm-template-config, the authentication module must be enabled and your final message should include an authentication request in the form of a key-value message:


When running ovmd like this, ovmd prepares two pipes (infd and outfd) and calls the ovm-template-config script transparently in the background in the following way:

# ovm-template-config --input <infd> --output <outfd> configure

During testing, it may be useful to simply pass configuration information directly to the script from STDIN on the command line. This can be achieved by calling the script directly with the --stdin parameter:

# ovm-template-config --stdin configure <<EOF
> {"com.oracle.linux.selinux.mode": "disabled"}
> {"com.oracle.linux.root-password": "ovsroot"}

Configuration can also be achieved directly from the console by running the script using the --console-input option. Doing this will prompt you for values for each of the keys that need to be defined for any enabled modules:

# ovm-template-config --console-input configure