HvDeletePartition function

The HvDeletePartition function completes the partition destruction operation by deleting a finalized or uninitialized partition.

Syntax


HV_STATUS  HvDeletePartition(
  _In_  HV_PARTITION_ID PartitionId
);

Parameters

PartitionId [in]

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

Return value

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

Return codeDescription
HV_STATUS_SUCCESS

HvDeletePartition successfully deleted the partition.

HV_STATUS_ACCESS_DENIED

The specified partition is not a child of the caller.

HV_STATUS_INVALID_PARTITION_ID

The specified partition identifier is invalid.

HV_STATUS_OPERATION_DENIED

The specified partition's pool has not been drained of all pages.

HV_STATUS_INVALID_PARTITION_STATE

The specified partition is not in the finalized or uninitialized state.

 

Remarks

The caller must be the parent of the specified partition. Partition deletion releases any memory that the HvCreatePartition function allocated back to the creating partition's pool. The deleted partition's resources are returned as described in Partition Destruction.

After a successful deletion, the partition identifier is invalid.

HvDeletePartition has the following restrictions:

  • The specified partition must be in the in the finalized or uninitialized state.

  • The caller must be the parent of the specified partition.

  • The partition's pool must be empty.

Native Interface

HvDeletePartition [fast]

Call Code = 0x0043

Input Parameters

0

PartitionId (8 bytes)

 

Requirements

Version

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

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.