Compartir a través de


IVMAccountant::SetSchedulingParameters method

The SetSchedulingParameters method sets the scheduling parameters for a virtual machine.

Syntax

HRESULT SetSchedulingParameters(
  [in] VARIANT reservedSystemCapacity,
  [in] VARIANT maxSystemCapacity,
  [in] long    relativeWeight
);

Parameters

reservedSystemCapacity [in]

Minimum percentage of system capacity that will always be available to this virtual machine. The minimum value for this parameter is 0, the maximum value depends on the number of host processors. This argument is treated as a floating-point value (that is, VARIANT of type VT_R8).

maxSystemCapacity [in]

Maximum percentage of system capacity that can be used by this virtual machine. The minimum value for this parameter is 1, the maximum value depends on the number of host processors. This argument is treated as a floating-point value (that is, VARIANT of type VT_R8).

relativeWeight [in]

Number between 1 and 10,000 representing priority of this virtual machine relative to other virtual machines. A higher number indicates a higher priority.

Return value

This method supports standard return values, as well as the following. For information on Virtual Server specific return values not listed below, see HRESULT Codes Specific to the Virtual Server.

Return code Description
S_OK
The operation was successful.
E_INVALIDARG
A parameter was out of range.
VM_E_VM_UNKNOWN
Unknown virtual machine.
DISP_E_EXCEPTION
An unexpected error occurred.

Remarks

The maximum values for reservedSystemCapacity and maxSystemCapacity depend on the number of processors on the host. For one host processor, the maximum percentage is 100. For two host processors, the maximum percentage is 50. For four host processors, the maximum percentage is 25. The reserve system capacity must be less than or equal to the maxSystemCapacity.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMAccountant