1. Oracle VM Server for SPARC 软件概述
A. Oracle VM Server for SPARC 物理机到虚拟机转换工具
B. Oracle VM Server for SPARC Configuration Assistant
D. 将 XML 接口与 Logical Domains Manager 结合使用
下面是 Logical Domains Manager 资源以及可以为每个资源定义的属性。这些资源和属性在 XML 示例中以粗体显示。下列示例显示了未绑定输出的资源。约束输出可用于为 Logical Domains Manager 操作创建输入。但域迁移输出除外。请参见域迁移。每个资源都定义在 <Section> OVF 段中并由 <rasd:OtherResourceType> 标记指定。
示例 D-6 ldom_info XML 输出示例
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" 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:GenericPropertykey="hostid">83d8baf6</gprop:GenericProperty> <gprop:GenericProperty key="master">plum</gprop:GenericProperty> <gprop:GenericProperty key="failure-policy">reset</gprop:GenericProperty> <gprop:GenericProperty key="progress">45%</gprop:GenericProperty> <gprop:GenericProperty key="status">ongoing</gprop:GenericProperty> <gprop:GenericProperty key="source">dt90-319</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
ldom_info 资源始终包含在 <Content> 段中。ldom_info 资源中的下列属性是可选属性:
<rasd:Address> 标记,指定要分配给域的 MAC 地址。
<gprop:GenericPropertykey="failure-policy"> 标记,指定从属域在主域失败时应表现出的行为。默认值为 ignore。下面是有效的属性值:
ignore 忽略主域故障(从属域不受影响)。
panic 在主域失败时使所有从属域都发生紧急情况。
reset 在主域失败时重置所有从属域。
stop 在主域失败时停止所有从属域。
<gprop:GenericPropertykey="hostid"> 标记,指定要分配给域的主机 ID。
<gprop:GenericPropertykey="master"> 标记,指定最多四个用逗号分隔的主域名称。
<gprop:GenericPropertykey="progress"> 标记,指定命令执行的进度百分比。
<gprop:GenericPropertykey="source"> 标记,指定报告命令进度的计算机。
<gprop:GenericPropertykey="status"> 标记,指定命令的状态(done、failed 或 ongoing)。
add-vcpu、set-vcpu 和 remove-vcpu XML 请求操作的等效操作是按照如下方式设置 <gpropGenericProperty key="wcore"> 标记的值:
如果使用 -c 选项,请将 wcore 属性设置为指定的全体核心数。
如果未使用 -c 选项,请将 wcore 属性设置为 0。
请注意,cpu 资源的分配单位属性 <rasd:AllocationUnits> 始终指定虚拟 CPU 数,而非核心数。
示例 D-7 cpu XML 示例
以下示例显示 ldm add-vcpu -c 1 ldg1 命令的等效 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"> <cmd> <action>add-vcpu</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>cpu</rasd:OtherResourceType> <rasd:AllocationUnits>8</rasd:AllocationUnits> <gprop:GenericProperty key="wcore">1</gprop:GenericProperty> </Item> </Section> </Content> </Envelope> </data> </cmd> </LDM_interface>
cpu 资源始终包含在 <Content> 段中。
注 - mau 资源是受支持服务器上的任意受支持的加密单元。当前,存在两个受支持的加密单元:模运算单元 (Modular Arithmetic Unit, MAU) 和控制字队列 (Control Word Queue, CWQ)。
示例 D-8 mau XML 示例
<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>
mau 资源始终包含在 <Content> 段中。唯一属性为 <rasd:AllocationUnits> 标记,用于指出 MAU 数或其他加密单元数。
示例 D-9 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>
内存资源始终包含在 <Content> 段中。唯一属性为 <rasd:AllocationUnits> 标记,用于指出内存大小。
示例 D-10 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) 资源可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。唯一属性为 <gprop:GenericProperty> 标记,其中含有 service_name 项,该项包含所描述的 vds 资源的名称。
示例 D-11 vds_volume XML 示例
<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>
vds_volume 资源可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
vol_name-卷名
service_name-此卷要绑定到的虚拟磁盘服务器的名称
block_dev-要与此卷关联的文件或设备名称
可选地,vds_volume 资源还可以具有以下属性:
vol_opts-下列一项或多项,用逗号分隔,在一个字符串内:{ro,slice,excl}
mpgroup-多路径(故障转移)组的名称
示例 D-12 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>
disk 资源始终包含在 <Content> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
vdisk_name-虚拟磁盘的名称
service_name-此虚拟磁盘要绑定到的虚拟磁盘服务器的名称
vol_name-此虚拟磁盘要关联到的虚拟磁盘服务设备
可选地,disk 资源还可以具有 timeout 属性,它是在虚拟磁盘客户机 (vdc) 与虚拟磁盘服务器 (vds) 之间建立连接时的超时值(以秒计)。如果存在多个虚拟磁盘 (vdisk) 路径,则 vdc 可以尝试连接到不同的 vds,该超时可确保在指定的时间内建立到任意 vds 的连接。
示例 D-13 vsw XML 示例
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vsw</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">vsw1-ldg1</gprop:GenericProperty> <gprop:GenericProperty key="dev_path">bge0</gprop:GenericProperty> <gprop:GenericProperty key="linkprop">phys-state</gprop:GenericProperty> <rasd:Address>00:14:4f:fc:00:01</rasd:Address> <gprop:GenericProperty key="mode">sc</gprop:GenericProperty> <gprop:GenericProperty key="pvid">12345678</gprop:GenericProperty> <gprop:GenericProperty key="vid">87654321</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
vsw 资源既可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
service_name-要分配给虚拟交换机的名称。
linkprop-指定虚拟设备是否应获取物理链路状态更新。当值为 phys-state 时,虚拟设备可获取物理链路状态更新。当值为空时,虚拟设备不会获取物理链路状态更新。默认情况下,虚拟设备不会获取物理链路状态更新。
dev_path-要与此虚拟交换机关联的网络设备的路径
可选地,vsw 资源还可以具有以下属性:
<rasd:Address>-向虚拟交换机分配 MAC 地址
pvid-端口的虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络需要以无标记模式成为其成员的 VLAN。
vid-虚拟局域网 (Virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络和虚拟交换机需要以标记模式成为其成员的 VLAN。
mode-Oracle Solaris Cluster 心跳支持的 sc。
示例 D-14 network XML 示例
<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="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>
network 资源始终包含在 <Content> 段中。它必须含有带有以下项的 <gprop:GenericProperty> 标记:
linkprop-指定虚拟设备是否应获取物理链路状态更新。当值为 phys-state 时,虚拟设备可获取物理链路状态更新。当值为空时,虚拟设备不会获取物理链路状态更新。默认情况下,虚拟设备不会获取物理链路状态更新。
vnet_name-虚拟网络 (vnet) 的名称
service_name-此虚拟网络要绑定到的虚拟交换机 (vswitch) 的名称
可选地,network 资源还可以具有以下属性:
<rasd:Address>-向虚拟交换机分配 MAC 地址
pvid-端口的虚拟局域网 (virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络需要以无标记模式成为其成员的 VLAN。
vid-虚拟局域网 (Virtual local area network, VLAN) 标识符 (identifier, ID),表示虚拟网络和虚拟交换机需要以标记模式成为其成员的 VLAN。
mode-用于为该虚拟网络启用混合 I/O 的 hybrid。
示例 D-15 vcc XML 示例
<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>
vcc 资源既可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
service_name-要分配给虚拟控制台集中器服务的名称
min_port-要与此 vcc 关联的最小端口号
max_port-要与此 vcc 关联的最大端口号
示例 D-16 var XML 示例
<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>
var 资源始终包含在 <Content> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
name-变量的名称
value-变量的值
示例 D-17 physio_device XML 示例
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>physio_device</rasd:OtherResourceType> <gprop:GenericProperty key="name">pci@780</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
physio_device 资源始终包含在 <Content> 段中。唯一属性为 <gprop:GenericProperty> 标记,其中含有 name 属性值项,该项为所描述的 I/O 设备的名称。
示例 D-18 spconfig XML 示例
<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> </Item> </Section> </Envelope>
服务处理器 (service processor, SP) 配置 (spconfig) 资源始终独自出现于 <Envelope> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
spconfig_name-要在 SP 上存储的配置的名称
spconfig_status-特定 SP 配置的当前状态在 ldm list-spconfig 命令的输出中会使用此属性。
示例 D-19 vdpcs XML 示例
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vdpcs</rasd:OtherResourceType> <gprop:GenericProperty key="service_name">dg1-vdpcs</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
仅 Netra DPS 环境中会涉及此资源。vdpcs 资源既可以在 <Content> 段中作为域描述的一部分,也可以独自出现于 <Envelope> 段中。唯一属性为 <gprop:GenericProperty> 标记,其中含有 service_name 属性值项,该项为所描述的虚拟数据平面通道服务 (vdpcs) 资源的名称。
示例 D-20 vdpcc XML 示例
<Envelope> <References/> <Content xsi:type="ovf:VirtualSystem_Type" id="ldg1"> <Section xsi:type="ovf:VirtualHardwareSection_Type"> <Item> <rasd:OtherResourceType>vdpcc</rasd:OtherResourceType> <gprop:GenericProperty key="vdpcc_name">vdpcc</gprop:GenericProperty> <gprop:GenericProperty key="service_name">ldg1-vdpcs</gprop:GenericProperty> </Item> </Section> </Content> </Envelope>
仅 Netra DPS 环境中会涉及此资源。虚拟数据平面通道客户机资源始终包含在 <Content> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
vdpcc_name-虚拟数据平面通道客户机 (vdpcc) 的名称
service_name-此 vdpcc 要绑定到的虚拟数据平面通道服务 vdpcs 的名称
示例 D-21 console XML 示例
<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> </Item> </Section> </Content> </Envelope>
console 资源始终包含在 <Content> 段中。它可以含有带有以下项的 <gprop:GenericProperty> 标记:
port-此虚拟控制台 (console) 要更改为的端口
service_name-此 console 要绑定到的虚拟控制台集中器 (vcc) 服务
group-此 console 要绑定到的组的名称
以下示例将介绍 migrate-domain 子命令的 <data> 段中包含的内容。
示例 D-22 migrate-domain <data> 段示例
<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>
其中:
第一个 <Content> 节点(不含 <ldom_info> 段)是要迁移的源域。
第二个 <Content> 节点(含有 <ldom_info> 段)是要迁移到的目标域。源域和目标域的名称可以相同。
目标域的 <ldom_info> 段描述要迁移到的计算机以及迁移到该计算机所需的详细信息:
target-host 是要迁移到的目标计算机。
user-name 是目标计算机的登录用户名。必须采用 SASL 64 位编码。
password 是登录到目标计算机时使用的密码。必须采用 SASL 64 位编码。
注 - Logical Domains Manager 使用 sasl_decode64() 对目标用户名和密码进行解码,使用 sasl_encode64() 对这些值进行编码。SASL 64 编码等同于 base64 编码。