Update Cluster DRS Configuration operation

The Update Cluster DRS Configuration operation enables you to update the Cluster Distributed Resource Scheduler (DRS) configuration. You can also use this operation to manage DRS settings at the virtual machine level.

The following table describes the adapter request elements for the Update Cluster DRS Configuration operation:

Element

Definition

Required

<operation-type>

Defines the type of the operation: Cluster

Yes

<operation-name>

Defines the name of the operation: Update_Cluster_DRS_Configuration

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If the <transport> element is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Note

If the value of the <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user name that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional; required if <user-name> is specified

<parameters>

Contains the elements required to execute the operation

Yes

<cluster-compute-resource>

Specifies the name of the cluster whose DRS configuration
needs to be updated

Valid value: Any string

Yes

<drs-config>

Specifies the DRS configuration

This element includes the default settings for virtual machines.

Valid format:
<drs-config>
  <enabled></enabled>
  <enable-vm-behavior-overrides></enable-vm-behavior-overrides>
  <default-vm-behavior></default-vm-behavior>
</drs-config>

<enabled>: Flag that specifies whether the service is enabled

<enable-vm-behavior-overrides>: Flag that indicates whether the
DRS behavior overrides for individual virtual machines are enabled.
The default value is false.

<default-vm-behavior>: Specifies the cluster-wide default DRS behavior
for virtual machines. Valid values are:

  • fullyAutomated - Specifies that the VirtualCenter should automate both
    the migration of the virtual machines
    and their placement on a host in the powered-on state
  • manual - Specifies that the VirtualCenter should generate
    recommendations for virtual machine migration
    and for placement with a host, but should not implement the recommendation
    automatically
  • partialAutomated - Specifies that VirtualCenter should generate
    recommendations for virtual machine
    migration and for placement with a host, but should automatically implement
    only the placement
    at power on

No

<drs-vm-config-spec>

Specifies the DRS configuration for individual virtual
machines

The entries in this array override the cluster default settings.

Valid format:
<drs-vm-config-spec>
  <operation></operation>
  <info>
    <virtual-machine></virtual-machine>
    <enabled></enabled>
    <behavior></behavior>
  </info>
</drs-vm-config-spec>

<operation>: Specifies the type of operation being performed. This element
is applicable only if the virtual machine specific DRS settings needs to
be updated. Valid values are:

  • add - add a configuration for the virtual machine, overwriting the
    existing configuration if it exists
  • edit: incrementally update the existing configuration; an existing
    configuration must exist.
    In the context of updating DRS settings of a virtual machine, this means
    that 'edit' can only be specified
    when the 'Automation Level' of virtual machine is set to a value other than
    "(Default) Manual".

    <virtual-machine>: Specifies the virtual machine whose DRS configuration needs
    to be updated

    <enabled>: Indicates whether the VirtualCenter is allowed to perform any
    DRS migration or initial placement recommendations for this virtual machine.
    If this flag is false, the virtual machine is effectively excluded from DRS.
    If no individual DRS specification exists for a virtual machine, this propert
    defaults to true.

    <behavior>: Specifies the particular DRS behavior for this virtual machine.
    Valid values are:
  • fullyAutomated: Specifies that the VirtualCenter should automate both the
    migration of virtual machines and their placement with a host in the
    powered-on state
  • manual: Specifies that the VirtualCenter should generate recommendations
    for virtual machine migration and for placement with a host, but should not
    implement the recommendations automatically.
  • partiallyAutomated: Specifies that the VirtualCenter should generate
    recommendations for virtual machine migration and for placement with a
    host, but should automatically implement only the placement at power on.

No

<modify>

If this element is set to true, an unset property has no effect on the existing property value in the cluster configuration of the server.

If this element is set to false, the cluster configuration reverts to the default values, and the new configuration values are applied later.

Yes

<group-spec-list>

Contains the following <group-spec> elements:

  • <group-spec>
  • <operation>
  • <info>
  • <name>
  • <virtual-machine-list>
  • <virtual-machine>
  • <host-system-list>
  • <host-system>
Conditional; required if there is more than one <group-sec> element
<group-spec>Specifies the cluster-wide group configuration that contains a group of VMs or a group of hostsNo

<operation>

Specifies the type of operation to be performed on the specified VM or host group

Valid values: add, edit

Note:  All VMs or the Hosts provided in the request with the edit operation override the existing content of the specified DRS group.

Conditional; required if the <group-spec> element is available
<info>Contains all elements with the info of a VM DRS group or a Host DRS group

Contains a type attribute that signifies the type of the DRS group. 

Valid values for the type attribute: 
  • ClusterHostGroup
  • ClusterVmGroup
No
<name>

Specifies a unique name of the DRS group that you want to add

If a group with the specified name exists either in the VM DRS or in the Host DRS groups list, the API generates an error. 

Specifies the name of the DRG group that you want to edit

Conditional; required if the <info> element is available
<virtual-machine-list>Contains the list of virtual machines in a VM DRS groupConditional; required if the DRS group is of the ClusterVmGroup type and if multiple <virtual-machine> elements are present
<virtual-machine>Specifies the virtual machine to be added in the VM DRS group

The adapter ignores any invalid value specified in the request.
Conditional; required if the DRS group is of the ClusterVmGroup type
<host-system-list>Contains the list of host systems in a Host DRS GroupConditional; required if the DRS group is of the ClusterHostGroup type and multiple <host-system> elements are present
<host-system>

Specifies the host to be added in the Host DRS group

The adapter ignores any invalid value specified in the request.

Conditional; required if the DRS group is of the ClusterHostGroup type


The following code sample shows a sample adapter request for the Update Cluster DRS Configuration operation.

Sample adapter request for the Update Cluster DRS Configuration operation

<vmware-infrastructure-request>
    <operation-type>Cluster</operation-type>
    <operation-name>Update_Cluster_DRS_Configuration</operation-name>
    <vmware-infrastructure-request>
      <operation-type>Cluster</operation-type>
      <operation-name>Update_Cluster_DRS_Configuration</operation-name>
      <parameters>
        <cluster-compute-resource>Test Cluster</cluster-compute-resource>
        <spec>
          <drs-config>
            <enabled>true</enabled>
            <enable-vm-behavior-overrides>true</enable-vm-behavior-overrides>
            <default-vm-behavior>manual</default-vm-behavior>
          </drs-config>
          <drs-vm-config-spec>
            <operation>add</operation>
            <info>
              <virtual-machine>TestLinuxOne</virtual-machine>
              <enabled>true</enabled>
              <behavior>fullyAutomated</behavior>
            </info>
          </drs-vm-config-spec>
        </spec>
        <modify>true</modify>
      </parameters>
    </vmware-infrastructure-request>
  </vmware-infrastructure-request>

The following code sample shows the response for the sample Update Cluster DRS Configuration operation.

Sample adapter response for the Update Cluster DRS Configuration operation

<vmware-infrastructure-response>
  <metadata>
    <status>success</status>
  </metadata>
  <ReconfigureComputeResource_TaskResponse>
    <Task>task-5162</Task>
  </ReconfigureComputeResource_TaskResponse>
</vmware-infrastructure-response>

Was this page helpful? Yes No Submitting... Thank you

Comments