ovmtconfig - configure Oracle VM for SPARC templates
/opt/ovmtutils/bin/ovmtconfig -d domain-name [-b] [-c command,command] [-C] [-f] [-h|H] [-n] [-p name=value,name=value | -P prop-filename,prop-filename] [-q] [-s] [-v] [-z]
The ovmtconfig command enables you to run one or more predetermined actions on logical domain file systems.
Run this command on the control domain of the system that contains the domain to configure. Currently, the ovmtconfig command operates only on domains that have virtual disks with the internal format zpools, ZFS file systems, and a single boot environment.
You can configure only one domain at a time.
You must run this command as superuser.
The ovmtconfig command has the following options:
Sets the OpenBoot auto-boot? property value to true.
Specify one or more commands to run. command can be a full path to any valid executable found in a file system that is visible to the control domain. However, command cannot be on a file system in the target domain. Encapsulate any command options in quotes.
The commands that you specify are executed in the order specified on the command line.
When the specified commands are run, the following properties file is updated depending on whether the command includes command-line arguments:
Command-line options. Updates a temporary properties file on the mount point for the file system in the target domain.
No command-line options. Updates the master properties file on the mount point.
If command returns any non-zero value, the ovmtconfig command exits with an error level of 99. Any updates made to the properties file are removed.
The following scripts, in the scripts directory, can configure basic Oracle Solaris 11 and Oracle Solaris 10 domains. These scripts are used in conjunction with the sample solaris.properties file and any additional properties specified on command line:
Configures an Oracle Solaris 10 domain based upon sysidconfig property values.
Installs the OS by using the default Oracle Solaris 10 interactive installer on boot.
Configures an Oracle Solaris 11 domain based upon sc_profile.xml property value.
Installs the OS by using the default Oracle Solaris 11 interactive installer on boot.
Clears local properties that have been set by using the –v option and the either the –P or –p option.
You can use this option to clear the local variables after deploying a domain from a template. Or, you can use this option with the –v option and with the –P or –p option to clear the local variables before setting them.
Note that the –C option does not clear VMAPI variables. It clears the local variables that are configured in the ldm variable namespace under OVMT_VAR, which typically are used for application configuration first-boot properties. Starting with the Oracle Solaris 11.2 OS, other Oracle Solaris configuration variables and client applications that use VMAPI are cleared automatically when read in on the client side.
Specifies the name of a domain that exists on the current system. The domain state must be inactive. However, all resources such as disk images must be present and part of the domain constraints. Use caution if you attempt to use the –f option for domains that are in a running state. The –f option method might lead to file system corruption.
Caution - Do not stop or interrupt ovmtconfig during operation or the backmounted domain is not rolled back automatically. Perform all manual actions by using another terminal window or session.
Forces a running domain to stop.
Shows a summarized help file.
Performs a dry run, which performs all operational steps including the stop and unbind of the domain, and the backmount of file system. In this case, a message shows the commands to be run with arguments and an listing of the temporary properties file.
Specifies a comma-separated list of properties as name-value pairs. The specified properties are combined with any other properties into a temporary master properties file. The name-value pairs are parsed in order and take precedence over identical property names in the supplied properties files. Property names and values must not contain spaces or escape characters.
An example of a complex property might be:
Specifies a comma-separated list of plain text properties files that contain properties in name-value pair format. Each property in the file is on a line by itself. The properties files are parsed in order. If a property is duplicated in a later one of the properties files, it overwrites the value specified in an earlier property file. If a property file format is incorrect, ovmtconfig returns an error level of 2.
Note that a name-value pair that is specified on the command line takes precedence over a name-value pair in a configuration file.
The props/solaris.properties file describes the properties that you can use to configure Oracle Solaris 11 and Oracle Solaris 10 domains.
Reports only errors and error levels.
Automatically starts the domain after the successful completion of the backmount, command execution and rollback. The ovmtconfig command does not attempt to start a domain if a failure occurred when running the commands. If the –s option is not specified, ovmtconfig returns the domain to its original state.
Creates logical domain properties from consolidated properties in the following form:
Pauses the ovmtconfig command to enable you to perform manual actions after the backmount even if no commands are specified. This option shows the temporary root mount point and the path to a temporary properties file, if appropriate.
The following command backmounts the ldg0 domain so that you can perform manual actions. The –z option pauses the command so that you can perform manual actions during the backmount.
primary# /opt/ovmtutils/bin/ovmtconfig -d ldg0 -zExample 2 Running a Single Command and Setting a Property
The following command backmounts the ldg0 domain and runs a single command, command.sh, and sets the com.oracle.solaris.system.computer-name property to solaris:
primary# /opt/ovmtutils/bin/ovmtconfig -d ldg0 -p com.oracle.solaris.system.computer-name=solaris \ -c command.shExample 3 Configuring a Domain by Using Configuration Files
The following command configures the ldg0 domain by using a sample script, properties, and property files. The domain is forced to stop and unbind, and then re-start upon completion.
primary# /opt/ovmtutils/bin/ovmtconfig -d ldg0 \ -p com.oracle.solaris.system.computer-name=solaris, \ com.oracle.solaris.network.ipaddr.0=10.0.0.100 \ -P solaris.props,apps.props -c path-to-utils/scripts/ovmt_s11_scprofile.sh -s -fExample 4 Setting Variables, Stopping, and Restarting the Domain
The following command sets logical domain variables for the ldg0 domain. This ovmtconfig command does not run any commands, but the domain is forced to stop and re-start after the operation completes. The domain is not backmounted.
primary# /opt/ovmtutils/bin/ovmtconfig -d ldg0 -v -s -f
The following exit values are returned:
An error occurred.
A usage error occurred.
An error in the execution of the commands file.
See the attributes(7) man page for a description of the following attributes.