You can use the Logical Domains Manager to establish dependency relationships between domains. A domain that has one or more domains that depend on it is called a master domain. A domain that depends on another domain is called a slave domain.
Each slave domain can specify up to four master domains by setting the master property. For example, the pine slave domain specifies its four master domains in the following comma-separated list:
# ldm add-domain master=apple,lemon,orange,peach pine
Each master domain can specify what happens to its slave domains in the event that the master domain fails. For instance, if a master domain fails, it might require its slave domains to panic. If a slave domain has more than one master domain, the first master domain to fail triggers its defined failure policy on all of its slave domains.
The master domain's failure policy is controlled by setting one of the following values to the failure-policy property:
ignore ignores any slave domains
panic panics any slave domains
reset resets any slave domains
stop stops any slave domains
In this example, the master domains specify their failure policy as follows:
# ldm set-domain failure-policy=ignore apple # ldm set-domain failure-policy=panic lemon # ldm set-domain failure-policy=reset orange # ldm set-domain failure-policy=stop peach
You can use this mechanism to create explicit dependencies between domains. For example, a guest domain implicitly depends on the service domain to provide its virtual devices. A guest domain's I/O is blocked when the service domain on which it depends is not up and running. By defining a guest domain as a slave of its service domain, you can specify the behavior of the guest domain when its service domain goes down. When no such dependency is established, a guest domain just waits for its service domain to return to service.
For domain dependency XML examples, see Example 19–6.