Update Harware operation for Microsoft Hyper-V Server 2012 adapter

This section illustrates the adapter requests and responses for the following Update_Hardware operations:

Use the <items> element when you call an adapter from an out-of-the-box process in BMC Atrium Orchestrator Development Studio. Use the adapter request XML when you create a custom process by using the Call Adapter activity in BMC Atrium Orchestrator Development Studio.

Update Virtual Machine Memory

The Update Virtual Machine Memory operation updates the memory resources of a virtual machine (VM) created on the Microsoft Hyper-V server. This topic illustrates the actor adapter request and response and describes the elements used in the request.\

Warning

The Update Virtual Machine Memory operation works only when the state of the VM is "Stopped".

The following table describes the elements for the adapter request:

 Adapter request elements for the Update Virtual Machine Memory operation 

Element

Description

Required

<operation-name>

Specifies the name of the operation: update-vm-memory

Yes

<arguments>

Contains the elements that specify the details for the VM to be updated

Yes

<target>

Contains a dynamic target configuration or uses a predefined target configuration of the Hyper-V server on which the request is executed

Note: If you do not specify a dynamic target in the adapter request, the default adapter configuration is used.

The <target> element contains the following elements:

  • <host>
  • <user-name>
  • <password>
  • <timeout-secs>

Conditional; required if a target is referenced or specified in the request

<host>

Specifies the host name or the IP address of the Hyper-V server

The <host> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<user-name>

Specifies the user name to be used to connect to the Hyper-V server 

The <user-name> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<password>

Specifies the password that corresponds to the <user-name>specified 

The <password> element applies to a dynamic target. 

The <password> element can contain an encryption-typeattribute that indicates whether the password specified is encrypted. 

Valid values for encryption-type: base64, plain (default)

Conditional; required if <user-name> is specified

<timeout-secs>

Specifies the time, in seconds, after which the attempt to connect to the Hyper-V server fails 

Default value: 60

No

<vm>Specifies the name of the VM on which the memory is to be updatedYes
<dynamic-memory-enabled>Specifies whether dynamic memory is to be enabled on the virtual machine to be configuredNo
<startup-bytes>Specifies the initial amount of memory to be assigned to a virtual machine with dynamic memory enabled, or the total amount of memory to be assigned to a virtual machine with dynamic memory disabledNo
<priority>

Sets the priority for memory availability to this virtual machine relative to other virtual machines on the virtual machine host

You can specify values in the range from 0 to 100.

No
<buffer>Specifies the percentage of memory to reserve as a buffer in the virtual machine to be configured. Allowed values range from 5 to 2000No

The following figure shows a sample <items> XML element for the Update Virtual Machine Memory operation. 

Sample <items> XML element for the Update Virtual Machine Memory operation

<items>
    <item>
        <target>
            <host>localhost</host>
            <user-name>admin</user-name>
            <password encryption-type="Base64">YWRtaW4=</password>
            <timeout-secs>120</timeout-secs>
        </target>
            <vm-name>Test_VM</vm-name>
           <dynamic-memory-enabled>true</dynamic-memory-enabled>
	<startup-bytes>256MB</startup-bytes>
       </item>
<item>
        <target>
            <host>localhost</host>
            <user-name>admin</user-name>
            <password encryption-type="Base64">YWRtaW4=</password>
            <timeout-secs>120</timeout-secs>
        </target>
            <vm-name>Test_VM</vm-name>
           <minimum-bytes>64MB</minimum-bytes>
<maximum-bytes>2GB</maximum-bytes>
	<startup-bytes>256MB</startup-bytes>
	<priority>80</priority>
	<buffer>25</buffer>
 </item>
</items>

The following figure shows a sample adapter request for the Update Virtual Machine Memory operation: 

Sample adapter request for the Update Virtual Machine Memory operation

<ms-hyperv-request>
  <operation-name>update-vm-memory</operation-name>
               <arguments>
        <target>
            <host>localhost</host>
            <user-name>admin</user-name>
            <password encryption-type="Base64">YWRtaW4=</password>
        </target>
            <vm-name>Test_VM</vm-name>
           <dynamic-memory-enabled>true</dynamic-memory-enabled>
      <startup-bytes>256MB</startup-bytes>
       </arguments>
<arguments>
        <target>
            <host>localhost</host>
            <user-name>admin</user-name>
            <password encryption-type="Base64">YWRtaW4=</password>
        </target>
            <vm-name>Test_VM</vm-name>
           <minimum-bytes>64MB</minimum-bytes>
<maximum-bytes>2GB</maximum-bytes>
      <startup-bytes>256MB</startup-bytes>
      <priority>80</priority>
      <buffer>25</buffer>
</arguments>
</ms-hyperv-request>

The following figure shows a sample adapter response for the Update Virtual Machine Memory operation: 

Sample adapter response for the Update Virtual Machine Memory operation

<ms-hyperv-response>
  <metadata>
    <status>success</status>
    <response-count>1</response-count>
  </metadata>
  <responses>
    <UpdateVirtualMachineMemoryResponse>
      <metadata>
        <target>BW-HOU-DCA-DV01</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <items>
        <item />
      </items>
    </UpdateVirtualMachineMemoryResponse>
  </responses>
</ms-hyperv-response> 

Update Virtual Machine Processors

The Update Virtual Machine Processors operation sets the processor resources allocated to a virtual machine (VM) created on the Microsoft Hyper-V server. This topic illustrates the actor adapter request and response and describes the elements used in the request.

Warning

The Update Virtual Machine Processors operation works only when the state of the VM is "Stopped". 

The following table describes the elements for the adapter request:

Adapter request elements for the Update Virtual Machine Processors operation 

Element

Description

Required

<operation-name>

Specifies the name of the operation: update-vm-processors

Yes

<arguments>

Contains the elements that specify the details of the processors that need to be updated

Yes

<target>

Contains a dynamic target configuration or uses a predefined target configuration of the Hyper-V server on which the request is executed

Note: If you do not specify a dynamic target in the adapter request, the default adapter configuration is used.

The <target> element contains the following elements:

  • <host>
  • <user-name>
  • <password>
  • <timeout-secs>

Conditional; required if a target is referenced or specified in the request

<host>

Specifies the host name or the IP address of the Hyper-V server

The <host> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<user-name>

Specifies the user name to be used to connect to the Hyper-V server 

The <user-name> element applies to a dynamic target.

Conditional; required when specifying a dynamic target

<password>

Specifies the password that corresponds to the <user-name>provided 

The <password> element applies to a dynamic target. 

The <password> element can contain an encryption-typeattribute that indicates whether the password specified is encrypted. 

Valid values for encryption-type: base64, plain (default)

Conditional; required if<user-name> is provided

<timeout-secs>

Specifies the time, in seconds, after which the attempt to connect to the Hyper-V server fails 

Default value: 60

No

<vm-name>

Specifies the name of the VM on which the processors need to be updated

Yes

<count>Specifies the total number of CPU cores in the virtual machineNo
<reserve>

Specifies the percentage of processor resources to be reserved for this virtual machine

You can specify values in the range of 0 to 100

No
<maximum>

Specifies the maximum percentage of resources available to the virtual machine processor to be configured

You can specify values in the range of 0 to 100

No
<compatibility-for-migration-enabled>Specifies whether the virtual processor’s features are to be limited for compatibility when migrating the virtual machine to another hostNo

The following figure shows a sample <items> XML element for the Update Virtual Machine Processors operation. 

Sample <items> XML element for the Update Virtual Machine Processors operation

<items>
	<item>
        <target>
			<host>localhost</host>
			<user-name>admin</user-name>
			<password encryption-type="Base64">YWRtaW4=</password>
			<timeout-secs>120</timeout-secs>
		</target>
		   <vm-name>Test_VM</vm-name>
		   <count>1</count>
		   <maximum>75</maximum>
		   <reserve>10</reserve>
      </item>
 	<item>
        <target>
			<host>localhost</host>
			<user-name>admin</user-name>
			<password encryption-type="Base64">YWRtaW4=</password>
			<timeout-secs>120</timeout-secs>
		</target>
		<vm-name>Test_VM</vm-name>
	        <compatibility-for-migration-enabled>true</compatibility-for-migration-enabled>
      </item>
</items>

The following figure shows a sample adapter request for the Update Virtual Machine Processors operation: 

Sample adapter request for the Update Virtual Machine Processors operation

<ms-hyperv-request>
  <operation-name>update-vm-memory</operation-name>
               <arguments>
<target>
                  <host>localhost</host>
                  <user-name>admin</user-name>
                  <password encryption-type="Base64">YWRtaW4=</password>
            </target>
            <vm-name>Test_VM</vm-name>
            <count>1</count>
            <maximum>75</maximum>
            <reserve>10</reserve>
</arguments>
      <arguments>
<target>
                  <host>localhost</host>
                  <user-name>admin</user-name>
                  <password encryption-type="Base64">YWRtaW4=</password>
            </target>
            <vm-name>Test_VM</vm-name>
        <compatibility-for-migration-enabled>true</compatibility-for-migration-enabled>
</arguments>
</ms-hyperv-request>

The following figure shows a sample adapter response for the Update Virtual Machine Processors operation: 

Sample adapter response for the Update Virtual Machine Processors operation

<ms-hyperv-response>
  <metadata>
    <status>success</status>
    <response-count>1</response-count>
  </metadata>
  <responses>
    <UpdateVirtualMachineProcessorsResponse>
      <metadata>
        <target>BW-HOU-DCA-DV01</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <items>
        <item />
      </items>
    </UpdateVirtualMachineProcessorsResponse>
  </responses>
</ms-hyperv-response>
Was this page helpful? Yes No Submitting... Thank you

Comments