HvSetPartitionProperty function

The HvSetPartitionProperty function sets a property of a partition.

Syntax


HV_STATUS  HvSetPartitionProperty(
  _In_  HV_EVENTLOG_TYPE PartitionId,
  _In_  UINT64 PropertyCode,
  _In_  HV_PARTITION_PROPERTY PropertyValue
);

Parameters

PartitionId [in]

An HV_PARTITION_ID value that identifies the partition to set a property on. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.

PropertyCode [in]

An HV_PARTITION_PROPERTY_CODE enumeration value that specifies the property for which the caller sets the property value.

PropertyValue [in]

An HV_PARTITION_PROPERTY value that specifies the new property value. HV_PARTITION_PROPERTY is defined as an unsigned 64-bit (UINT64) value.

Return value

HvSetPartitionProperty returns one of the following values. In addition to these values, HvSetPartitionProperty can also return one of the values that are specified in Common Hypercall Status Codes.

Return codeDescription
HV_STATUS_SUCCESS

HvSetPartitionProperty successfully set a property of a partition.

HV_STATUS_ACCESS_DENIED

The caller is not the parent of the specified target partition (unless the caller and the target partition are both the root partition).

HV_STATUS_INVALID_PARTITION_ID

The specified partition identifier is invalid.

HV_STATUS_UNKNOWN_PROPERTY

The specified property code is not a valid property.

HV_STATUS_PROPERTY_VALUE_OUT_OF_RANGE

The specified property value, while valid in some circumstances, violates an invariant (for example, a CPU reservation causes the total reservations to exceed 100%).

An attempt to modify a static partition privilege is not allowed.

HV_STATUS_OBJECT_IN_USE

The specified property value, when nonzero, must be unique across all partitions and is currently in use.

HV_STATUS_INVALID_PARAMETER

The specified property value is invalid.

HV_STATUS_INVALID_PARTITION_STATE

The specified partition is not in the active state.

HV_STATUS_INSUFFICIENT_MEMORY

The number of pages in the memory pool of the specified partition is insufficient to perform the operation.

 

Remarks

The caller must be the specified partition's parent, or the root partition that sets its own properties.

HvSetPartitionProperty has the following restrictions:

  • The partition that the PartitionId parameter specifies must be in the active state.

  • The caller must either be the parent of the partition specified by PartitionId or the root partition that specifies its own partition identifier.

Native Interface

HvSetPartitionProperty

Call Code = 0x0045

Input Parameters

0

PartitionId (8 bytes)

8

PropertyCode (4 bytes) Padding (4 bytes)

16

PropertyValue (8 bytes)

 

Requirements

Version

HvSetPartitionProperty is available in version 1.0 and later versions of the hypervisor.

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

See also

HV_PARTITION_PROPERTY_CODE
HvGetPartitionProperty

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.