How to Restore a Domain Configuration From an XML File (ldm init-system)

You should have created an XML configuration file by running the ldm list-constraints -x command. The file should describe one or more domain configurations.

This procedure explains how to use the ldm init-system command with an XML file to re-create a previously saved configuration.

Caution:

The ldm init-system command might not correctly restore a configuration in which physical I/O commands have been used. Such commands are ldm add-io, ldm set-io, ldm remove-io, ldm create-vf, and ldm destroy-vf. For more information, see ldm init-system Command Might Not Correctly Restore a Domain Configuration on Which Physical I/O Changes Have Been Made in Oracle VM Server for SPARC 3.6 Release Notes.
  1. Log in to the primary domain.
  2. Verify that the system is in the factory-default configuration.
    primary# ldm list-spconfig | grep "factory-default"
    factory-default [current]

    If the system is not in the factory-default configuration, see How to Restore the factory-default Configuration.

  3. Become an administrator.
  4. Restore the domain configuration or configurations from the XML file.
    primary# ldm init-system [-frs] -i filename.xml

    The primary domain must be rebooted for the configuration to take effect. The -r option reboots the primary domain after the configuration. If you do not specify the -r option, you must perform the reboot manually.

    The -s option restores only the virtual services configuration (vds, vcc, and vsw) and might be able to be performed without having to reboot.

    The -f option skips the factory-default configuration check and continues regardless of what was already configured on the system. Use the -f option with caution. The ldm init-system command assumes that the system is in the factory-default configuration and so directly applies the changes that are specified by the XML file. Using -f when the system is in a configuration other than the factory-default likely result in a system that is not configured as specified by the XML file. One or more changes might fail to be applied to the system, depending on the combination of changes in the XML file and the initial configuration.

    The primary domain is reconfigured as specified in the file. Any non-primary domains that have configurations in the XML file are reconfigured but left inactive.

Example 16-3 Restoring Domains From XML Configuration Files

The following examples show how to use the ldm init-system command to restore the primary domain and all the domains on a system from the factory-default configuration.

  • Restore the primary domain. The -r option is used to reboot the primary domain after the configuration completes. The primary.xml file contains the XML domain configuration that you saved at an earlier time.

    primary# ldm init-system -r -i primary.xml
  • Restore all the domains on a system. Restore the domains on the system to the configurations in the config.xml XML file. The config.xml file contains the XML domain configurations that you saved at an earlier time. The primary domain is restarted automatically by the ldm init-system command. Any other domains are restored but not bound and restarted.

    primary# ldm init-system -r -i config.xml

    After the system reboots, the following commands bind and restart the ldg1 and ldg2 domains:

    primary# ldm bind ldg1
    primary# ldm start ldg1
    primary# ldm bind ldg2
    primary# ldm start ldg2