Logical Domains 1.2 管理ガイド

制御ドメインの再構築

この節では、ldm list-constraints -x primary コマンドの標準的なの XML 出力を、primary ドメインの再構成に必要な CLI コマンドに変換する方法について説明します。XML 出力のサンプルでは、XML から CLI コマンドを作成するために使用するリソースおよびプロパティーが太字で示されています。CLI コマンドの詳細は、ldm(1M) マニュアルページを参照してください。

ldm list-constraints -x primary コマンドの出力のサンプルを次に示します。


例 4–1 list-constraints サブコマンドの XML 出力のサンプル


<?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">e1000g0</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>

<Content> タグおよび <Content> タグ内の <Section> には、primary ドメイン、および primary ドメインに含まれるすべてのリソースが記述されています。<Item> 内の <rasd:...> タグおよび <gprop:GenericProperty...> タグには、各リソースに必要なプロパティーが記述されています。各 <Section> の各リソースを確認して、リソースの制約に基づいて CLI コマンドを作成できます。以降の節では、ドメインの XML 記述でより一般的ないくつかのリソースと、そのリソースに対する同等の CLI コマンドを示します。

論理ドメインの情報 (ldom_info) セクション

このセクションには、primary ドメインの MAC アドレスおよびホスト ID の情報が記述されます。これは primary ドメインであるため、この情報を設定することはできません。この情報は自動的に設定されます。


例 4–2 論理ドメインの情報 (ldom_info) セクション


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

この例での論理ドメインの情報 (ldom_info) は、次のとおりです。

暗号化 (mau) セクション

このセクションには、primary ドメインに割り当てられた暗号化装置 (mau) の数が記述されます。


注 –

XML の一覧では mau セクションは cpu セクションのあとに記述されていますが、set-mau サブコマンドは set-cpu サブコマンドの前に実行する必要があります。これは、対応する暗号化装置を削除しないかぎりドメインから CPU を削除できないためです。



例 4–3 暗号化 (mau) セクション


<Section> xsi:type="ovf:VirtualHardwareSection_Type"
  <Item>
    <rasd:OtherResourceType>mau</rasd:OtherResourceType>
    <rasd:AllocationUnits>1</rasd:AllocationUnits>
  </Item>
</Section>

このセクションは、次の CLI コマンドに相当します。


# ldm set-mau 1 primary

CPU (cpu) セクション

このセクションには、primary ドメインに割り当てられた仮想 cpu の数が記述されます。


例 4–4 CPU (cpu) セクション


<Section> xsi:type="ovf:VirtualHardwareSection_Type"
  <Item>
    <rasd:OtherResourceType>cpu</rasd:OtherResourceType>
    <rasd:AllocationUnits>4</rasd:AllocationUnits>
  </Item>
</Section>

このセクションは、次の CLI コマンドに相当します。


# ldm set-vcpu 4 primary

メモリー (memory) セクション

このセクションには、primary ドメインに割り当てられたメモリーの量が記述されます。


例 4–5 メモリー (memory) セクション


<Section> xsi:type="ovf:VirtualHardwareSection_Type"
  <Item>
    <rasd:OtherResourceType>memory</rasd:OtherResourceType>
    <rasd:AllocationUnits>4G</rasd:AllocationUnits>
  </Item>
</Section>

このセクションは、次の CLI コマンドに相当します。


# ldm set-memory 4G primary

物理入出力 (physio_device) セクション

このセクションには、primary ドメインに残す物理 I/O バスが記述されます。


例 4–6 物理 I/O (physio_device) セクション


<Section> xsi:type="ovf:VirtualHardwareSection_Type"
  <Item>
    <rasd:OtherResourceType>physio_device</rasd:OtherResourceType>
    <gprop:GenericProperty key="name">pci@7c0</gprop:GenericProperty>
  </Item>
</Section>

以前の構成どおりに、同じ I/O デバイスを primary ドメインに設定するには、まず、起動時に構成される I/O デバイスを一覧表示する必要があります。


# ldm list -l primary
....
IO
    DEVICE           PSEUDONYM        OPTIONS
    pci@7c0          bus_b
    pci@780          bus_a
....

例 4–6 で、primary ドメインに残るように以前に構成されていたバスは、pci@7c0 です。XML に他の physio-device セクションが含まれていない場合、pci@780 バスを削除する必要があります。

このセクションは、次の CLI コマンドに相当します。


# ldm remove-io pci@780 primary

仮想スイッチ (vsw) セクション

このセクションには、primary ドメインに割り当てられた仮想スイッチ (vsw) が記述されます。


<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">e1000g0</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>

各表記の意味は次のとおりです。

default-vlan-id (1)、pvid (1) など、このセクションの一部の値にはデフォルト値が使用されるため、このセクションは次の CLI コマンドに相当します。


# ldm add-vswitch net-dev=e1000g primary-vsw0 primary

仮想コンソール端末集配信装置 (vcc) セクション

このセクションには、primary ドメインに割り当てられた仮想コンソール端末集配信装置 (vcc) が記述されます。


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

XML のキープロパティー service_name は、vcc サービスの名前 (この場合は、primary-vcc0) を示します。

このセクションは、次の CLI コマンドに相当します。


# ldm add-vcc port-range=5000-6000 primary-vcc0 primary

仮想ディスクサーバー (vds) セクション

このセクションには、primary ドメインに割り当てられた仮想ディスクサーバー (vds) が記述されます。


<Section xsi:type="ovf:VirtualHardwareSection_Type">
  <Item>
    <rasd:OtherResourceType>vds</rasd:OtherResourceType>
    <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty>
  </Item>
</Section>

XML のキープロパティー service_name は、仮想ディスクサーバーのこのインスタンスのサービス名 (この場合は、primary-vds0) を示します。この service_name は、サーバー上のすべての仮想ディスクサーバーインスタンスの中で一意である必要があります。

このセクションは、次の CLI コマンドに相当します。


# ldm add-vds primary-vds0 primary

仮想ディスクサーバーデバイス (vdsdev) セクション

このセクションには、primary ドメインに割り当てられた仮想ディスクサーバーによってエクスポートされたデバイス (vdsdev) が記述されます。


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

各表記の意味は次のとおりです。

このセクションは、次の CLI コマンドに相当します。


# ldm add-vdsdev options=ro mpgroup=mpgroup-name
/opt/SUNWldm/domain_disks/testdisk1 vdsdev0@primary-vds0