This section provides instructions for how to translate typical XML output from an ldm list-constraints -x primary command into the CLI commands needed to reconfigure a primary domain. The resources and properties that you use to translate XML into CLI commands are shown in bold type in the sample XML output. Refer to the ldm(1M) man page for complete information about the CLI commands.
A sample output from a ldm list-constraints -x primary command follows.
<?xml version="1.0"?> <LDM_interface version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./schemas/combined-v3.xsd" xmlns:ovf="./schemas/envelope" xmlns:rasd="./schemas/CIM_ResourceAllocationSettingData" xmlns:vssd="./schemas/CIM_VirtualSystemSettingData" xmlns:gprop="./schemas/GenericProperty" xmlns:bind="./schemas/Binding"> <data version="3.0"> <Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" ovf:id="primary"> <Section xsi:type="ovf:ResourceAllocationSection_Type"> <Item> <rasd:OtherResourceType>ldom_info</rasd:OtherResourceType> <rasd:Address>00:03:ba:d8:ba:f6</rasd:Address> <gprop:GenericProperty key="hostid">0x83d8baf6</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>cpu</rasd:OtherResourceType> <rasd:AllocationUnits>4</rasd:AllocationUnits> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>mau</rasd:OtherResourceType> <rasd:AllocationUnits>1</rasd:AllocationUnits> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>memory</rasd:OtherResourceType> <rasd:AllocationUnits>4G</rasd:AllocationUnits> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name">pci@7c0</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vsw</rasd:OtherResourceType> <rasd:Address>auto-allocated</rasd:Address> <gprop:GenericProperty key="service_name">primary-vsw0</gprop:GenericProperty> <gprop:GenericProperty key="dev_path">nxge0</gprop:GenericProperty> <gprop:GenericProperty key="default-vlan-id">1</gprop:GenericProperty> <gprop:GenericProperty key="pvid">1</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vcc</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">primary-vcc0</gprop:GenericProperty> <gprop:GenericProperty key="min_port">5000</gprop:GenericProperty> <gprop:GenericProperty key="max_port">6000</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vds</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vds_volume</rasd:OtherResourceType> <gprop:GenericProperty key="vol_name">primary-vds0-vol0</gprop:GenericProperty> <gprop:GenericProperty key"block_dev">/opt/SUNWldm/domain_disks/testdisk.nv.53.1</gprop:GenericProperty> <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty> </Item> </Section> </Content> </Envelope> </data> </LDM_interface> |
The <Content> tag and the <Section>s inside the <Content> tag describe the primary domain and all the resources contained in the primary domain. The <rasd:...> and <gprop:GenericProperty...> tags within <Item>s describe the properties needed for each resource. You can go through each resource in each <Section> and construct CLI commands based on the resource's constraints. The following sections identify some of the more common resources in the domain XML description and the equivalent CLI command for that resource.
This section describes the primary domain's MAC address and host ID information. Because this is the primary domain, you cannot set this information; it is automatically set.
<Section> xsi:type="ovf:ResourceAllocationSection_Type"> <Item> <rasd:OtherResourceType>ldom_info</rasd:OtherResourceType> <rasd:Address>00:03:ba:d8:ba:f6</rasd:Address> <gprop:GenericProperty key="hostid">0x83d8baf6</gprop:GenericProperty> </Item> </Section> |
In this example, the logical domain information (ldom_info) is as follows:
(MAC) Address - 00:03:ba:d8:ba:f6
hostid - 0x83d8baf6
This section describes the number of cryptographic units (maus) allocated to the primary domain.
Even though the mau section comes after the cpu section in the XML listing, you must run the set-mau subcommand before the set-cpu subcommand, because you cannot remove CPUs from a domain without also removing their corresponding cryptographic units.
<Section> xsi:type="ovf:VirtualHardwareSection_Type" <Item> <rasd:OtherResourceType>mau</rasd:OtherResourceType> <rasd:AllocationUnits>1</rasd:AllocationUnits> </Item> </Section> |
This section is equivalent to the following CLI command:
# ldm set-mau 1 primary |
This section describes the number of virtual cpus allocated to the primary domain.
<Section> xsi:type="ovf:VirtualHardwareSection_Type" <Item> <rasd:OtherResourceType>cpu</rasd:OtherResourceType> <rasd:AllocationUnits>4</rasd:AllocationUnits> </Item> </Section> |
This section is equivalent to the following CLI command:
# ldm set-vcpu 4 primary |
This section describes the amount of memory allocated to the primary domain.
<Section> xsi:type="ovf:VirtualHardwareSection_Type" <Item> <rasd:OtherResourceType>memory</rasd:OtherResourceType> <rasd:AllocationUnits>4G</rasd:AllocationUnits> </Item> </Section> |
This section is equivalent to the following CLI command:
# ldm set-memory 4G primary |
This section describes the physical I/O buses that you want to remain in the primary domain.
<Section> xsi:type="ovf:VirtualHardwareSection_Type" <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name">pci@7c0</gprop:GenericProperty> </Item> </Section> |
To set your primary domain with the same I/O devices as previously configured, you first need to list the I/O devices that are configured on startup.
# ldm list -l primary .... IO DEVICE PSEUDONYM OPTIONS pci@7c0 bus_b pci@780 bus_a .... |
In Example 10–6, the bus previously configured to remain in the primary domain was pci@7c0. If there are no other physio-device sections in the XML, the pci@780 bus must be removed.
This section is equivalent to the following CLI command:
# ldm remove-io pci@780 primary |
This section describes any virtual switches (vsws) allocated to the primary domain.
<Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vsw</rasd:OtherResourceType> <rasd:Address>auto-allocated</rasd:Address> <gprop:GenericProperty key="service_name">primary-vsw0</gprop:GenericProperty> <gprop:GenericProperty key="dev_path">nxge0</gprop:GenericProperty> <gprop:GenericProperty key="mode">sc</gprop:GenericProperty> <gprop:GenericProperty key="default-vlan-id">1</gprop:GenericProperty> <gprop:GenericProperty key="pvid">1</gprop:GenericProperty> </Item> </Section> |
Where:
The <rasd:Address> tag describes the MAC address to be used for the virtual switch. If the value of this tag is auto-allocated, you do not need to supply a MAC address.
The XML key property service_name is the name of the virtual switch; in this case, primary-vsw0.
The XML key property dev_path is the path name for the actual network device; in this case net-dev=nxge.
The XML key property mode indicates sc for SunCluster heartbeat support.
Some of the values in this section are default values, such as the default-vlan-id (1) and pvid (1), so the section is equivalent to the following CLI command:
# ldm add-vswitch net-dev=nxge primary-vsw0 primary |
This section describes any virtual console concentrator (vcc) allocated to the primary domain.
<Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vcc</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">primary-vcc0</gprop:GenericProperty> <gprop:GenericProperty key="min_port">5000</gprop:GenericProperty> <gprop:GenericProperty key="max_port">6000</gprop:GenericProperty> </Item> </Section> |
Where the XML key property service_name is the name of the vcc service; in this case, primary-vcc0.
This section is the equivalent of the following CLI command:
# ldm add-vcc port-range=5000-6000 primary-vcc0 primary |
This section describes any virtual disk server (vds) allocated to the primary domain.
<Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vds</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty> </Item> </Section> |
Where the XML key property service_name is the service name for this instance of the virtual disk server; in this case, primary-vds0. The service_name must be unique among all virtual disk server instances on the server.
This section is the equivalent of the following CLI command:
# ldm add-vds primary-vds0 primary |
This section describes any device (vdsdev) exported by the virtual disk server that is allocated to the primary domain.
<Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vds_volume</rasd:OtherResourceType> <gprop:GenericProperty key="vol_name">vdsdev0</gprop:GenericProperty> <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty> <gprop:GenericProperty key="block_dev">/opt/SUNWldm/domain_disks/testdisk1</gprop:GenericProperty> <gprop:GenericProperty key="vol_opts">ro</gprop:GenericProperty> <gprop:GenericProperty key="mpgroup">mpgroup-name</gprop:GenericProperty> </Item> </Section> |
Where:
The XML key properties volume name (vol_name) and service name (service_name) are paired in the CLI command; in this case, vdsdev0@primary-vds0.
The XML key property block_dev is the backend argument in the equivalent CLI command, which is the location where data of a virtual disk are stored; in this case, /opt/SUNWldm/domain_disks/testdisk1.
The optional XML key property vol_opts is one or more of the following, comma-separated, within one string: {ro,slice,excl}.
The optional XML key property mpgroup is the name of the multipath (failover) group.
This section is equivalent to the following CLI command:
# ldm add-vdsdev options=ro mpgroup=mpgroup-name /opt/SUNWldm/domain_disks/testdisk1 vdsdev0@primary-vds0 |