本节提供 Logical Domains Manager 资源以及可为每种资源定义的属性的示例。这些资源和属性在 XML 示例中以粗体显示。下列示例显示了未绑定输出的资源。可以使用约束输出为 Logical Domains Manager 操作创建输入,但域迁移输出除外。请参见域迁移。每个资源都定义在 <Section> OVF 段中并由 <rasd:OtherResourceType> 标记指定。
以下示例显示 ldom_info 资源的可选属性:
示例 10 ldom_info XML 输出示例以下示例显示为多个 ldom_info 属性指定的值,例如,uuid、hostid 和 Address。
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="primary"> <Section xsi:type="ovf:ResourceAllocationSection_type"> <Item> <rasd:OtherResourceType>ldom_info</rasd:OtherResourceType> <uuid>c2c3d93b-a3f9-60f6-a45e-f35d55c05fb6</uuid> <rasd:Address>00:03:ba:d8:ba:f6</rasd:Address> <gprop:GenericProperty key="hostid">83d8baf6</gprop:GenericProperty> <gprop:GenericProperty key="master">plum</gprop:GenericProperty> <gprop:GenericProperty key="failure-policy">reset</gprop:GenericProperty> <gprop:GenericProperty key="extended-mapin-space">on</gprop:GenericProperty> <gprop:GenericProperty key="progress">45%</gprop:GenericProperty> <gprop:GenericProperty key="status">ongoing</gprop:GenericProperty> <gprop:GenericProperty key="source">system1</gprop:GenericProperty> <gprop:GenericProperty key="rc-add-policy"></gprop:GenericProperty> <gprop:GenericProperty key="perf-counters">global</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
ldom_info 资源始终包含在 <Content> 段中。ldom_info 资源中的下列属性是可选属性:
<uuid> 标记(指定域的 UUID)。
<rasd:Address> 标记,指定要分配给域的 MAC 地址。
<gprop:GenericProperty key="extended-mapin-space"> 标记,用于指定为域启用 (on) 还是禁用 (off) 扩展 mapin 空间。默认值为 off。
<gprop:GenericProperty key="failure-policy"> 标记,用于指定从属域在主域发生故障时应表现出的行为。默认值为 ignore。下面是有效的属性值:
ignore 忽略主域故障(从属域不受影响)。
panic 在主域发生故障时使所有从属域都发生紧急情况。
reset 在主域发生故障时重置所有从属域。
stop 在主域发生故障时停止所有从属域。
<gprop:GenericProperty key="hostid"> 标记,用于指定要分配给域的主机 ID。
<gprop:GenericProperty key="master"> 标记,用于最多指定四个以逗号分隔的主域名称。
<gprop:GenericProperty key="progress"> 标记,用于指定命令执行的进度百分比。
<gprop:GenericProperty key="source"> 标记,用于指定报告命令进度的计算机。
<gprop:GenericProperty key="status"> 标记,用于指定命令的状态(done、failed 或 ongoing)。
<gprop:GenericProperty key="rc-add-policy"> 标记,用于指定对于可能添加到指定域的根联合体是启用还是禁用直接 I/O 和 SR-IOV I/O 虚拟化操作。有效值为 iov 和空值 (rc-add-policy=)。
<gprop:GenericProperty key="perf-counters"> 标记,用于指定要访问的性能寄存器集(global、htstrand、strand)。
如果平台没有性能访问功能,将忽略 perf-counters 属性值。
请注意,cpu 资源的分配单位属性 <rasd:AllocationUnits> 始终指定虚拟 CPU 数,而非核心数。
cpu 资源始终包含在 <Content> 段中。
示例 11 ldm list-bindings 命令的 cpu XML 部分输出以下示例使用 ldm list-bindings 命令显示 <cpu> 段的 XML 输出。
<?xml version="1.0"?> <LDM_interface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ovf="./schemas/envelope" xmlns:rasd="./schemas/CIM_ResourceAllocationSettingData" xmlns:vssd="./schemas/CIM_VirtualSystemSettingData" xmlns:gprop="./schemas/GenericProperty" xmlns:bind="./schemas/Binding" version="1.3" xsi:noNamespaceSchemaLocation="./schemas/combined-v3.xsd"> <cmd> <action>list-bindings</action> <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> <uuid>1e04cdbd-472a-e8b9-ba4c-d3eee86e7725</uuid> <rasd:Address>00:21:28:f5:11:6a</rasd:Address> <gprop:GenericProperty key="hostid">0x8486632a</gprop:GenericProperty> <failure-policy>fff</failure-policy> <wcore>0</wcore> <extended-mapin-space>0</extended-mapin-space> <cpu-arch>native</cpu-arch> <rc-add-policy/> <gprop:GenericProperty key="state">active</gprop:GenericProperty> </Item> </Section> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>cpu</rasd:OtherResourceType> <rasd:AllocationUnits>8</rasd:AllocationUnits> <bind:Binding> <Item> <rasd:OtherResourceType>cpu</rasd:OtherResourceType> <gprop:GenericProperty key="vid">0</gprop:GenericProperty> <gprop:GenericProperty key="pid">0</gprop:GenericProperty> <gprop:GenericProperty key="cid">0</gprop:GenericProperty> <gprop:GenericProperty key="strand_percent">100</gprop:GenericProperty> <gprop:GenericProperty key="util_percent">1.1%</gprop:GenericProperty> <gprop:GenericProperty key="normalized_utilization">0.1%</gprop:GenericProperty> </Item> </Section> </Content> </Envelope> </data> </cmd> </LDM_interface>示例 12 ldm list-domain 命令的 cpu XML 部分输出
以下示例使用 ldm list-domain 命令显示 <cpu> 段的 XML 输出。
<?xml version="1.0"?> <LDM_interface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ovf="./schemas/envelope" xmlns:rasd="./schemas/CIM_ResourceAllocationSettingData" xmlns:vssd="./schemas/CIM_VirtualSystemSettingData" xmlns:gprop="./schemas/GenericProperty" xmlns:bind="./schemas/Binding" version="1.3" xsi:noNamespaceSchemaLocation="./schemas/combined-v3.xsd"> <cmd> <action>list-domain</action> <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> <gprop:GenericProperty key="state">active</gprop:GenericProperty> <gprop:GenericProperty key="flags">-n-cv-</gprop:GenericProperty> <gprop:GenericProperty key="utilization">0.7%</gprop:GenericProperty> <gprop:GenericProperty key="uptime">3h</gprop:GenericProperty> <gprop:GenericProperty key="normalized_utilization">0.1%</gprop:GenericProperty> </Item> </Section> </Content> </Envelope> </data> </cmd> </LDM_interface>
mau 资源始终包含在 <Content> 段中。唯一属性为 <rasd:AllocationUnits> 标记,用于指出 MAU 数或其他加密单元数。
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>mau</rasd:OtherResourceType> <rasd:AllocationUnits>1</rasd:AllocationUnits> </Item> </Section> </Content> </Envelope>
内存资源始终包含在 <Content> 段中。唯一属性为 <rasd:AllocationUnits> 标记,用于指出内存大小。
示例 14 memory XML 示例<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>memory</rasd:OtherResourceType> <rasd:AllocationUnits>4G</rasd:AllocationUnits> </Item> </Section> </Content> </Envelope>
虚拟 SAN (vsan) 资源可以位于 <Content> 段中。它必须使用带有以下项的 <gprop:GenericProperty> 标记:
service_name-虚拟 SAN 的名称
vsan_iport-虚拟 SAN 的启动器端口
必须具有在 vsan_volume 段中包含单个 vol_name 属性的项。此 vol_name 属性必须设置为 *。
示例 15 vsan XML 示例<Envelope> <References/> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vsan</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">vs1</gprop:GenericProperty> <gprop:GenericProperty key="vsan_iport"> /pci@400/pci@1/pci@0/pci@8/SUNW,emlxs@0/fp@0,0</gprop:GenericProperty> <bind:Binding> <Item> <rasd:OtherResourceType>vsan_volume</rasd:OtherResourceType> <gprop:GenericProperty key="vol_name">*</gprop:GenericProperty> </Item> </bind:Binding> </Item> </Section> </Envelope>
虚拟磁盘服务器 (vds) 资源可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。唯一属性为 <gprop:GenericProperty> 标记,该标记具有 service_name 键,其中包含所描述的 vds 资源的名称。
示例 16 vds XML 示例<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vds</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">vdstmp</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
vds_volume 资源可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
vol_name-卷名
service_name-此卷要绑定到的虚拟磁盘服务器的名称
block_dev-要与此卷关联的文件或设备名称
(可选)vds_volume 资源还可以具有以下属性:
vol_opts-下列一项或多项,用逗号分隔,在一个字符串内:{ro,slice,excl}
mpgroup-多路径(故障转移)组的名称
<Envelope> <References/> <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> </Envelope>
disk 资源始终包含在 <Content> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
vdisk_name-虚拟磁盘的名称
service_name-此虚拟磁盘要绑定到的虚拟磁盘服务器的名称
vol_name-此虚拟磁盘要关联到的虚拟磁盘服务设备
(可选)disk 资源还可以具有 timeout 属性,它是在虚拟磁盘客户机 (vdc) 与虚拟磁盘服务器 (vds) 之间建立连接时的超时值(秒)。如果具有多个虚拟磁盘 (vdisk) 路径,则 vdc 可以尝试连接到其他 vds。超时设置可以确保在指定时间段内与任何 vds 建立连接。
示例 18 disk XML 示例<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>disk</rasd:OtherResourceType> <gprop:GenericProperty key="vdisk_name">vdisk0</gprop:GenericProperty> <gprop:GenericProperty key="service_name">primary-vds0</gprop:GenericProperty> <gprop:GenericProperty key="vol_name">vdsdev0</gprop:GenericProperty> <gprop:GenericProperty key="timeout">60</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
vsw 资源既可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它必须具有带 service_name 键的 <gprop:GenericProperty> 标记,该键是要分配给虚拟交换机的名称。
(可选)vsw 资源还可以具有以下属性:
<rasd:Address>-向虚拟交换机分配 MAC 地址
default-vlan-id-指定在标记模式下,需要包含虚拟网络设备或虚拟交换机的默认虚拟局域网 (virtual local area network, VLAN)。第一个 VLAN ID (vid1) 是为 default-vlan-id 预留的。
dev_path-要与此虚拟交换机关联的网络设备的路径
id-指定新虚拟交换机设备的 ID。默认情况下将自动生成 ID 值,如果需要匹配 OS 中的现有设备名称,则设置此属性。
inter_vnet_link-指定是否为 Inter-Vnet 通信分配 LDC 通道。有效值为 on、off 和 auto。缺省值为 auto。
linkprop-指定虚拟设备获取物理链路状态更新(缺省值为 phys-state)。当值为空时,虚拟设备不会获取物理链路状态更新。
mode-Oracle Solaris Cluster 心跳支持的 sc。
pvid-端口的虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络需要以无标记模式成为其成员的 VLAN。
mtu-指定虚拟交换机或/和绑定到虚拟交换机的虚拟网络设备的最大传输单元 (maximum transmission unit, MTU)。有效值是 1500 到 16000。如果指定了无效值,ldm 命令会发出错误。
vid-虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络和虚拟交换机需要以标记模式成为其成员的 VLAN。
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg2"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vsw</rasd:OtherResourceType> <rasd:Address>00:14:4f:fb:ec:00</rasd:Address> <gprop:GenericProperty key="service_name">test-vsw1</gprop:GenericProperty> <gprop:GenericProperty key="inter_vnet_link">auto</gprop:GenericProperty> <gprop:GenericProperty key="default-vlan-id">1</gprop:GenericProperty> <gprop:GenericProperty key="pvid">1</gprop:GenericProperty> <gprop:GenericProperty key="mtu">1500</gprop:GenericProperty> <gprop:GenericProperty key="dev_path">switch@0</gprop:GenericProperty> <gprop:GenericProperty key="id">0</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
network 资源始终包含在 <Content> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
linkprop-指定虚拟设备获取物理链路状态更新(缺省值为 phys-state)。当值为空时,虚拟设备不会获取物理链路状态更新。
vnet_name-虚拟网络 (vnet) 的名称
service_name-此虚拟网络要绑定到的虚拟交换机 (vswitch) 的名称
custom-指定对于可以从受信任主机分配给虚拟网络设备的最大 VLAN 和 MAC 地址数,应当启用还是禁用这些项的定制设置。缺省值为 disable。
custom/max-mac-addrs-指定可以从受信任主机分配给虚拟网络设备的最大 MAC 地址数。缺省值为 4096。
custom/max-vlans-指定可以从受信任主机分配给虚拟网络设备的最大 VLAN 数。缺省值为 4096。
(可选)network 资源还可以具有以下属性:
<rasd:Address>-向虚拟交换机分配 MAC 地址
pvid-端口的虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络需要以无标记模式成为其成员的 VLAN。
vid-虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络和虚拟交换机需要以标记模式成为其成员的 VLAN。
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>network</rasd:OtherResourceType> <gprop:GenericProperty key="linkprop">phys-state</gprop:GenericProperty> <gprop:GenericProperty key="custom">enable</gprop:GenericProperty> <gprop:GenericProperty key="custom/max-mac-addrs">4096</gprop:GenericProperty> <gprop:GenericProperty key="custom/max-vlans">12</gprop:GenericProperty> <gprop:GenericProperty key="vnet_name">ldg1-vnet0</gprop:GenericProperty> <gprop:GenericProperty key="service_name">primary-vsw0</gprop:GenericProperty> <rasd:Address>00:14:4f:fc:00:01</rasd:Address> </Item> </Section> </Content> </Envelope>
vcc 资源既可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
service_name-要分配给虚拟控制台集中器服务的名称
min_port-要与此 vcc 关联的最小端口号
max_port-要与此 vcc 关联的最大端口号
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vcc</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">vcc1</gprop:GenericProperty> <gprop:GenericProperty key="min_port">6000</gprop:GenericProperty> <gprop:GenericProperty key="max_port">6100</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
var 资源始终包含在 <Content> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
name-变量的名称
value-变量的值
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>var</rasd:OtherResourceType> <gprop:GenericProperty key="name">test_var</gprop:GenericProperty> <gprop:GenericProperty key="value">test1</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
physio_device 资源始终包含在 <Content> 段中。可以使用 add-io、set-io、remove-io、create-vf、destroy-vf 和 set-domain 子命令来修改此资源。
示例 23 physio_device XML 示例以下示例说明如何对虚拟功能、物理功能和根联合体执行操作。
以下 XML 示例片段说明如何使用 ldm add-io 命令将 /SYS/MB/NET0/IOVNET.PF0.VF0 虚拟功能添加到 ldg1 域。
<LDM_interface version="1.3"> <cmd> <action>add-io</action> <data version="3.0"> <Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" ovf:id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name"> /SYS/MB/NET0/IOVNET.PF0.VF0</gprop:GenericProperty> </Item> </Section> </Content> </Envelope> </data> </cmd> </LDM_interface>
以下 XML 示例片段说明如何使用 ldm set-io 命令将 pci_1 根联合体的 iov_bus_enable_iov 属性值设置为 on。
<LDM_interface version="1.3"> <cmd> <action>set-io</action> <data version="3.0"> <Envelope> <References/> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name">pci_1</gprop:GenericProperty> <gprop:GenericProperty key="iov_bus_enable_iov"> on</gprop:GenericProperty> </Item> </Section> </Envelope> </data> </cmd> </LDM_interface>
以下 XML 示例片段说明如何使用 ldm set-io 命令将 /SYS/MB/NET0/IOVNET.PF1 物理功能的 unicast-slots 属性值设置为 6。
<LDM_interface version="1.3"> <cmd> <action>set-io</action> <data version="3.0"> <Envelope> <References/> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name"> /SYS/MB/NET0/IOVNET.PF1</gprop:GenericProperty> <gprop:GenericProperty key="unicast-slots">6</gprop:GenericProperty> </Item> </Section> </Envelope> </data> </cmd> </LDM_interface>
以下 XML 示例片段说明如何使用 ldm create-vf 命令创建具有以下属性值的 /SYS/MB/NET0/IOVNET.PF1.VF0 虚拟功能。
unicast-slots=6
pvid=3
mtu=1600
<LDM_interface version="1.3"> <cmd> <action>create-vf</action> <data version="3.0"> <Envelope> <References/> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vf_device</rasd:OtherResourceType> <gprop:GenericProperty key="iov_pf_name"> /SYS/MB/NET0/IOVNET.PF1</gprop:GenericProperty> <gprop:GenericProperty key="unicast-slots">6</gprop:GenericProperty> <gprop:GenericProperty key="pvid">3</gprop:GenericProperty> <gprop:GenericProperty key="mtu">1600</gprop:GenericProperty> </Item> </Section> </Envelope> </data> </cmd> </LDM_interface>
以下 XML 示例片段说明如何使用 ldm create-vf 命令创建 iov_pf_repeat_count_str 值 (3) 指定的虚拟功能数以及 /SYS/MB/NET0/IOVNET.PF1 物理功能。使用 iov_pf_repeat_count_str 属性创建多个虚拟功能时,不能指定其他属性值。
<LDM_interface version="1.3"> <cmd> <action>create-vf</action> <data version="3.0"> <Envelope> <References/> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vf_device</rasd:OtherResourceType> <gprop:GenericProperty key="iov_pf_name"> /SYS/MB/NET0/IOVNET.PF1</gprop:GenericProperty> <gprop:GenericProperty key="iov_pf_repeat_count_str"> 3</gprop:GenericProperty> </Item> </Section> </Envelope> </data> </cmd> </LDM_interface>
服务处理器 (service processor, SP) 配置 (spconfig) 资源始终独自出现于 <Envelope> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
spconfig_name-要在 SP 上存储的配置的名称。
spconfig_status-特定 SP 配置的当前状态。在 ldm list-spconfig 命令的输出中会使用此属性。
<Envelope> <Section xsi:type="ovf:ResourceAllocationSection_type"> <Item> <rasd:OtherResourceType>spconfig</rasd:OtherResourceType> <gprop:GenericProperty key="spconfig_name">primary</gprop:GenericProperty> <gprop:GenericProperty key="spconfig_status">current</gprop:GenericProperty> key="spconfig_aux_status">degraded</gprop:GenericProperty> </Item> </Section> </Envelope>
DRM 策略 (policy) 资源显示在 <Envelope> 段,可以包含带以下键的 <gprop:GenericProperty> 标记:
policy_name-DRM 策略的名称
policy_enable-指定 DRM 策略启用还是禁用
policy_priority-DRM 策略的优先级
policy_vcpu_min-域的虚拟 CPU 资源的最小数量
policy_vcpu_max-域的虚拟 CPU 资源的最大数量
policy_util_lower-触发策略分析的最低利用率级别
policy_util_upper-触发策略分析的最高利用率级别
policy_tod_begin-DRM 策略的有效启动时间
policy_tod_end-DRM 策略的有效停止时间
policy_sample_rate-抽样率,这是以秒为单位的周期时间
policy_elastic_margin-介于 CPU 利用率上下限之间的缓冲量
policy_attack-在任一资源控制周期内可添加的最大资源量
policy_decay-在任一资源控制周期内可删除的最大资源量
<Envelope> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>policy</rasd:OtherResourceType> <gprop:GenericProperty key="policy_name">test-policy</gprop:GenericProperty> <gprop:GenericProperty key="policy_enable">on</gprop:GenericProperty> <gprop:GenericProperty key="policy_priority">1</gprop:GenericProperty> <gprop:GenericProperty key="policy_vcpu_min">12</gprop:GenericProperty> <gprop:GenericProperty key="policy_vcpu_max">13</gprop:GenericProperty> <gprop:GenericProperty key="policy_util_lower">8</gprop:GenericProperty> <gprop:GenericProperty key="policy_util_upper">9</gprop:GenericProperty> <gprop:GenericProperty key="policy_tod_begin">07:08:09</gprop:GenericProperty> <gprop:GenericProperty key="policy_tod_end">09:08:07</gprop:GenericProperty> <gprop:GenericProperty key="policy_sample_rate">1</gprop:GenericProperty> <gprop:GenericProperty key="policy_elastic_margin">8</gprop:GenericProperty> <gprop:GenericProperty key="policy_attack">8</gprop:GenericProperty> <gprop:GenericProperty key="policy_decay">9</gprop:GenericProperty> </Item> </Section> </Envelope>
console 资源始终包含在 <Content> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
port-此虚拟控制台 (console) 要更改为的端口
service_name-此 console 要绑定到的虚拟控制台集中器 (vcc) 服务
group-此 console 要绑定到的组的名称
enable-log-对此控制台启用或禁用虚拟控制台日志记录
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>console</rasd:OtherResourceType> <gprop:GenericProperty key="port">6000</gprop:GenericProperty> <gprop:GenericProperty key="service_name">vcc2</gprop:GenericProperty> <gprop:GenericProperty key="group">group-name</gprop:GenericProperty> <gprop:GenericProperty key="enable-log">on</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
以下示例显示了 ldm migrate-domain 命令的 <data> 段中包含的内容。
第一个 <Content> 节点(不含 <ldom_info> 段)是要迁移的源域。
第二个 <Content> 节点(含有 <ldom_info> 段)是要迁移到的目标域。源域和目标域的名称可以相同。
目标域的 <ldom_info> 段描述要迁移到的计算机以及迁移到该计算机所需的详细信息:
target-host 是要迁移到的目标计算机。
user-name 是目标计算机的登录用户名,该用户名必须采用 SASL 64 位编码。
password 是目标计算机的登录密码,该密码必须采用 SASL 64 位编码。
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" ovf:id="ldg1"/> <Content xsi:type="ovf:VirtualSystem_Type" ovf:id="ldg1"/> <Section xsi:type="ovf:ResourceAllocationSection_Type"> <Item> <rasd:OtherResourceType>ldom_info</rasd:OtherResourceType> <gprop:GenericProperty key="target">target-host</gprop:GenericProperty> <gprop:GenericProperty key="username">user-name</gprop:GenericProperty> <gprop:GenericProperty key="password">password</gprop:GenericProperty> <Item> </Section> </Content> </Envelope>