Go to main content

Oracle® VM Server for SPARC 3.5 Administration Guide

Exit Print View

Updated: November 2017
 
 

Restoring Domain Configurations

    This section describes how to restore a domain configurations from an XML file for guest domains and for the control (primary) domain.

  • To restore a domain constraints for guest domains, you use the ldm add-domain -i command, as described in How to Restore a Domain Configuration From an XML File (ldm add-domain). Although you can save the primary domain's constraints to an XML file, you cannot use the file as input to this command.

  • To restore a domain configuration for the primary domain, you use the ldm init-system command and the resource constraints from the XML file to reconfigure your primary domain. You can also use the ldm init-system command to reconfigure other domains that are described in the XML file, but those domains might be left inactive when the configuration is complete. See How to Restore a Domain Configuration From an XML File (ldm init-system).

How to Restore a Domain Configuration From an XML File (ldm add-domain)

This procedure works for guest domains but not for the control (primary) domain. If you want to restore the configuration for the primary domain, or for other domains that are described in the XML file, see How to Restore a Domain Configuration From an XML File (ldm init-system).

  1. Create the domain by using the XML file that you created as input.
    primary# ldm add-domain -i domain-name.xml
  2. Bind the domain.
    primary# ldm bind-domain [-fq] domain-name

    The –f option forces the binding of the domain even if invalid back-end devices are detected. The –q option disables the validation of back-end devices so that the command runs more quickly.

  3. Start the domain.
    primary# ldm start-domain domain-name
Example 75  Restoring a Single Domain From an XML File

The following example shows how to restore a single domain. First, you restore the ldg1 domain from the XML file. Then, you bind and restart the ldg1 domain that you restored.

primary# ldm add-domain -i ldg1.xml
primary# ldm bind ldg1
primary# ldm start-domain ldg1

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

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


Caution

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.5 Release Notes.


Before You Begin

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.

  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.

    For Oracle Solaris 11.3, see Chapter 1, About Using Rights to Control Users and Processes in Securing Users and Processes in Oracle Solaris 11.3.

  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 76  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