El equivalente de las acciones de solicitud de XML add-vcpu, set-vcpu y remove-vcpu se fija el valor de la etiqueta <gpropGenericProperty key="wcore"> de la siguiente manera:
Si se usa la opción –c, fije la propiedad wcore en el número de núcleos completos especificados.
Si la opción –c no se usa, fije la propiedad wcore a 0.
Tenga en cuenta que la propiedad de unidades de asignación, <rasd:AllocationUnits>, para el recurso cpu siempre especifica el número de CPU virtuales y no el número de núcleos.
Un recurso cpu siempre está contenida en una sección <Content>.
Ejemplo 22-7 Ejemplo de XML de cpuEl siguiente ejemplo muestra la solicitud XML equivalente para el comando ldm add-vcpu -c 1 ldg1.
Oracle VM Server for SPARC 3.2 es la última versión de software que incluye la opción –c con los comandos ldm add-vcpu, ldm set-vcpu y ldm remove-vcpu.
<?xml version="1.0"?>
<LDM_interface version="1.3"
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>
Ejemplo 22-8 Salida de sección XML cpu del comando ldm list-bindings
En el ejemplo siguiente, se muestra la salida XML para la sección <cpu> mediante la ejecución del comando ldm list-bindings.
<?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>
<threading>8</threading>
<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>
Ejemplo 22-9 Salida de sección XML cpu del comando ldm list-domain
En el ejemplo siguiente, se muestra la salida XML para la sección <cpu> mediante la ejecución del comando ldm list-domain.
<?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>